SYMBOL INDEX (831 symbols across 104 files) FILE: examples/frame_title_fusion_embedding/main.py function parse_args (line 15) | def parse_args(): FILE: examples/frame_title_fusion_embedding/module/feature_parser.py class FrameFeature (line 12) | class FrameFeature(BaseFieldParser): method __init__ (line 13) | def __init__(self): method init (line 18) | def init(self, cfg): method parse (line 26) | def parse(self, row, training=False): method collate (line 49) | def collate(self, batch): class TagParser (line 62) | class TagParser(BaseFieldParser): method __init__ (line 63) | def __init__(self): method init (line 69) | def init(self, cfg): method parse (line 83) | def parse(self, row, training=False): method collate (line 98) | def collate(self, batch): class VidParser (line 113) | class VidParser(BaseFieldParser): method parse (line 115) | def parse(self, row, training=False): method collate (line 126) | def collate(self, batch): FILE: examples/frame_title_fusion_embedding/module/models.py function float_to_str (line 18) | def float_to_str(float_list): class ConcatCls (line 23) | class ConcatCls(torch.nn.Module): method __init__ (line 24) | def __init__(self, cfg): method forward (line 35) | def forward(self, video_feature, title_feature, label=None): method init_loss (line 56) | def init_loss(self): class EmbeddingTrainer (line 62) | class EmbeddingTrainer(TrainerBase): method __init__ (line 64) | def __init__(self, config, init_model=True): method report_step (line 71) | def report_step(self, step): method report_eval_step (line 79) | def report_eval_step(self, metric_info): method evalute_checkpoint (line 87) | def evalute_checkpoint(self, checkpoint_file: str, dataset_key: str, t... method evaluate_spearman (line 103) | def evaluate_spearman(self, checkpoint_file='', dataset_key="SPEARMAN_... method save_model (line 143) | def save_model(self, epoch): method train (line 153) | def train(self): method load_checkpoint_for_eval (line 164) | def load_checkpoint_for_eval(self, checkpoint_file): method empty_loop_test (line 176) | def empty_loop_test(self): FILE: examples/frame_title_fusion_embedding/module/utils.py class ConfigOptim (line 11) | class ConfigOptim: method config_from_dict (line 14) | def config_from_dict(cls, dict_obj): class LayeredOptim (line 23) | class LayeredOptim(ConfigOptim): method build (line 26) | def build(cls, model, cfg): class BCELoss (line 52) | class BCELoss: method build (line 55) | def build(cls, cfg): class PRScore (line 60) | class PRScore: method __init__ (line 61) | def __init__(self): method calc (line 67) | def calc(self, threshold=0.5): method collect (line 79) | def collect(self, labels, preds): method name (line 98) | def name(): FILE: lichee/config/config.py function get_cfg (line 93) | def get_cfg(): function merge_from_file (line 97) | def merge_from_file(file_path): function freeze (line 102) | def freeze(): function init_cfg (line 107) | def init_cfg(): function get_model_inputs (line 119) | def get_model_inputs(): FILE: lichee/core/common.py function init_gpu_setting_default (line 10) | def init_gpu_setting_default(self): function init_dataloader_default (line 26) | def init_dataloader_default(self): function get_inputs_batch_default (line 45) | def get_inputs_batch_default(self, batch): function get_label_batch_default (line 55) | def get_label_batch_default(self, batch): FILE: lichee/core/evaluator/evaluator_base.py class EvaluatorBase (line 17) | class EvaluatorBase: method __init__ (line 18) | def __init__(self, model_config_file): method init_gpu_setting (line 47) | def init_gpu_setting(self): method init_dataloader (line 53) | def init_dataloader(self): method init_metrics (line 56) | def init_metrics(self): method eval (line 64) | def eval(self): method eval_model (line 99) | def eval_model(self): method get_inputs_batch (line 148) | def get_inputs_batch(self, batch): method get_label_batch (line 151) | def get_label_batch(self, batch): FILE: lichee/core/predictor/predictor_base.py class PredictorBase (line 20) | class PredictorBase: method __init__ (line 21) | def __init__(self, model_config_file): method init_gpu_setting (line 56) | def init_gpu_setting(self): method init_dataloader (line 62) | def init_dataloader(self): method init_model (line 65) | def init_model(self): method init_metrics (line 72) | def init_metrics(self): method init_task_cls (line 79) | def init_task_cls(self): method predict (line 82) | def predict(self): method get_result_heads (line 139) | def get_result_heads(self, label_keys: list): method get_result_records (line 153) | def get_result_records(self, batch, label_vals, label_keys, model_outp... method get_inputs_batch (line 177) | def get_inputs_batch(self, batch): method get_label_batch (line 180) | def get_label_batch(self, batch): FILE: lichee/core/trainer/trainer_base.py class TrainerBase (line 22) | class TrainerBase: method __init__ (line 23) | def __init__(self, model_config_file, init_model=True): method init_config (line 66) | def init_config(self): method init_seed (line 70) | def init_seed(self): method init_distributed (line 74) | def init_distributed(self): method init_gpu_setting (line 88) | def init_gpu_setting(self): method gen_dataloader (line 113) | def gen_dataloader(self, data_config, training): method init_dataloader (line 143) | def init_dataloader(self): method init_model (line 149) | def init_model(self): method init_optimizer (line 153) | def init_optimizer(self): method init_schedule (line 157) | def init_schedule(self): method init_metrics (line 161) | def init_metrics(self): method train (line 168) | def train(self): method train_epoch (line 178) | def train_epoch(self): method report_step (line 220) | def report_step(self, step): method report_eval_step (line 223) | def report_eval_step(self, report_info): method eval_model (line 226) | def eval_model(self, epoch): method get_inputs_batch (line 260) | def get_inputs_batch(self, batch): method get_label_batch (line 263) | def get_label_batch(self, batch): method save_model (line 266) | def save_model(self, epoch): method save_eval_data (line 277) | def save_eval_data(self): method save_config_file (line 284) | def save_config_file(self): FILE: lichee/dataset/dataloader/data_builder.py class ChunkFileDataLoader (line 12) | class ChunkFileDataLoader: method __init__ (line 30) | def __init__(self, data_config, data_path_list, desc_path, use_cuda, t... method init_new_loader (line 58) | def init_new_loader(self): method __next__ (line 81) | def __next__(self): method __iter__ (line 90) | def __iter__(self): method __len__ (line 93) | def __len__(self): function build_dataloader (line 97) | def build_dataloader( function build_ddp_dataloader (line 124) | def build_ddp_dataloader(data_path_list: List[str], FILE: lichee/dataset/dataloader/dataset_base.py class BaseDataset (line 13) | class BaseDataset(metaclass=ABCMeta): method __init__ (line 14) | def __init__(self, cfg, data_path_list: List[str], desc_file, training... method init_parser (line 42) | def init_parser(self): method init_labels (line 63) | def init_labels(self): method get_indexes (line 68) | def get_indexes(self): method get_nth_data_file (line 82) | def get_nth_data_file(self, index): method get_data_len (line 95) | def get_data_len(self): method get_desc (line 101) | def get_desc(self): method try_convert_to_tfrecord (line 105) | def try_convert_to_tfrecord(self): method __len__ (line 112) | def __len__(self): method transform (line 115) | def transform(self, row): method collate (line 131) | def collate(self, batch): FILE: lichee/dataset/dataloader/dataset_mem.py class DatasetMem (line 12) | class DatasetMem(torch.utils.data.Dataset, BaseDataset, ABC): method __init__ (line 13) | def __init__(self, cfg, data_file, desc_file, training=True): method __getitem__ (line 16) | def __getitem__(self, index): FILE: lichee/dataset/field_parser/bert_common.py function prepare_bert_mix_grained_text (line 12) | def prepare_bert_mix_grained_text(parser, text, text_pair: bool): function collate_bert_mix_grained_text (line 23) | def collate_bert_mix_grained_text(parser, batch): function collate_bert_text (line 61) | def collate_bert_text(parser, batch): function prepare_bert_text (line 90) | def prepare_bert_text(parser, tokens, segment_ids): function collate_docbert_text (line 99) | def collate_docbert_text(parser, batch): function concate_bert_text (line 148) | def concate_bert_text(max_len, batch_token_ids, batch_segment_ids, batch... class BertTextPairFieldParserCommon (line 159) | class BertTextPairFieldParserCommon(BaseFieldParser): method __init__ (line 160) | def __init__(self): method init (line 165) | def init(self, cfg): method set_key (line 169) | def set_key(self, alias, keys: str): method parse (line 175) | def parse(self, row, training=False): method prepare_text (line 187) | def prepare_text(self, text): method collate (line 199) | def collate(self, batch): class BertTextFieldParserCommon (line 203) | class BertTextFieldParserCommon(BaseFieldParser): method __init__ (line 212) | def __init__(self): method init (line 217) | def init(self, cfg): method parse (line 221) | def parse(self, row, training=False): method prepare_text (line 245) | def prepare_text(self, text): method collate (line 251) | def collate(self, batch): FILE: lichee/dataset/field_parser/bert_mix_grained_text.py class BertMixGrainedTextFieldParser (line 9) | class BertMixGrainedTextFieldParser(BaseFieldParser): method __init__ (line 20) | def __init__(self): method init (line 25) | def init(self, cfg): method parse (line 29) | def parse(self, row, training=False): method collate (line 39) | def collate(self, batch): FILE: lichee/dataset/field_parser/bert_mix_grained_text_pair.py class BertMixGrainedTextFieldParser (line 11) | class BertMixGrainedTextFieldParser(BaseFieldParser): method __init__ (line 20) | def __init__(self): method init (line 24) | def init(self, cfg): method set_key (line 28) | def set_key(self, alias, keys: str): method parse (line 34) | def parse(self, row, training=False): method collate (line 46) | def collate(self, batch): FILE: lichee/dataset/field_parser/bert_text.py class BertTextFieldParser (line 7) | class BertTextFieldParser(BertTextFieldParserCommon): method __init__ (line 11) | def __init__(self): FILE: lichee/dataset/field_parser/bert_text_pair.py class BertTextFieldParser (line 7) | class BertTextFieldParser(BertTextPairFieldParserCommon): method __init__ (line 11) | def __init__(self): FILE: lichee/dataset/field_parser/docbert_text.py class BertTextFieldParser (line 7) | class BertTextFieldParser(BertTextFieldParserCommon): method __init__ (line 11) | def __init__(self): method collate (line 15) | def collate(self, batch): FILE: lichee/dataset/field_parser/docbert_text_pair.py class BertTextFieldParser (line 7) | class BertTextFieldParser(BertTextPairFieldParserCommon): method __init__ (line 11) | def __init__(self): method collate (line 15) | def collate(self, batch): FILE: lichee/dataset/field_parser/field_parser_base.py class BaseFieldParser (line 5) | class BaseFieldParser: method __init__ (line 6) | def __init__(self): method init (line 12) | def init(self, cfg): method set_key (line 19) | def set_key(self, alias, key): method parse (line 28) | def parse(self, record, training=False): method collate (line 37) | def collate(self, batch): FILE: lichee/dataset/field_parser/image_local_path.py class ImgDataFieldParser (line 12) | class ImgDataFieldParser(BaseFieldParser): method __init__ (line 21) | def __init__(self): method init (line 25) | def init(self, cfg): method parse (line 34) | def parse(self, row, training=False): method prepare_img_data (line 59) | def prepare_img_data(self, img_path): method collate (line 78) | def collate(self, batch): FILE: lichee/dataset/field_parser/img_bbox_det.py class ImgBBoxDetFieldParser (line 14) | class ImgBBoxDetFieldParser(BaseFieldParser): method __init__ (line 19) | def __init__(self): method init (line 25) | def init(self, cfg): method _resize_bboxes (line 36) | def _resize_bboxes(self, ori_bboxes, scale_factor): method parse (line 45) | def parse(self, row, training=False): method collate (line 119) | def collate(self, batch): FILE: lichee/dataset/field_parser/multi_cls.py class MultiLabelFieldParser (line 9) | class MultiLabelFieldParser(BaseFieldParser): method __init__ (line 14) | def __init__(self): method parse (line 17) | def parse(self, row, training=False): method collate (line 33) | def collate(self, batch): FILE: lichee/dataset/field_parser/sequence_label.py class BertTextFieldParser (line 10) | class BertTextFieldParser(BaseFieldParser): method __init__ (line 11) | def __init__(self): method init (line 16) | def init(self, cfg): method set_key (line 31) | def set_key(self, key): method parse (line 34) | def parse(self, row, training=False): method collate (line 70) | def collate(self, batch): FILE: lichee/dataset/field_parser/single_cls.py class LabelFieldParser (line 8) | class LabelFieldParser(BaseFieldParser): method __init__ (line 13) | def __init__(self): method parse (line 16) | def parse(self, row, training=False): method collate (line 27) | def collate(self, batch): FILE: lichee/dataset/field_parser/soft_tgt.py class SoftTargetLabelFieldParser (line 9) | class SoftTargetLabelFieldParser(BaseFieldParser): method __init__ (line 10) | def __init__(self): method parse (line 14) | def parse(self, row, training=False): method collate (line 28) | def collate(self, batch): FILE: lichee/dataset/field_parser/video_tsn.py class VideoTemporalSegmentSampleParser (line 13) | class VideoTemporalSegmentSampleParser(BaseFieldParser): method __init__ (line 24) | def __init__(self): method init (line 30) | def init(self, cfg): method parse (line 37) | def parse(self, row, training=False): method collate (line 52) | def collate(self, batch): method _sample (line 60) | def _sample(frames, num_segments, training): FILE: lichee/dataset/io_reader/io_reader_base.py class BaseIOReader (line 14) | class BaseIOReader: method get_index (line 19) | def get_index(cls, data_file, description_file, index_file: str = "") ... method get_iter (line 32) | def get_iter(cls, data_file, description_file, index_file: str = "", method get_data (line 47) | def get_data(cls, data_file, description_file, index_file: str = "") -... method get_desc (line 59) | def get_desc(cls, description_file) -> Dict: method convert_to_tfrecord (line 71) | def convert_to_tfrecord(cls, data_file, description_file): class TFRecordReader (line 82) | class TFRecordReader(BaseIOReader): method get_index (line 84) | def get_index(cls, data_file, description_file, index_file: str = "") ... method get_iter (line 89) | def get_iter(cls, data_file, description_file, index_file: str = "", method scan_or_create_index (line 96) | def scan_or_create_index(cls, data_file, index_file: str = "") -> (str... method convert_to_tfrecord (line 109) | def convert_to_tfrecord(cls, data_file, description_file): FILE: lichee/dataset/io_reader/json_sequence_label.py class JsonSequenceReader (line 11) | class JsonSequenceReader(BaseIOReader): method convert_to_tfrecord (line 13) | def convert_to_tfrecord(cls, data_file, description_file): FILE: lichee/dataset/io_reader/tfrecord.py class TFRecordReaderPlugin (line 7) | class TFRecordReaderPlugin(TFRecordReader): FILE: lichee/dataset/io_reader/tsv.py class TsvReader (line 11) | class TsvReader(BaseIOReader): method convert_to_tfrecord (line 13) | def convert_to_tfrecord(cls, data_file, description_file): FILE: lichee/dataset/sampler/distributed_sampler.py class DistributedSampler (line 10) | class DistributedSampler(_DistributedSampler): method __init__ (line 11) | def __init__(self, dataset, num_replicas=None, rank=None, shuffle=False): method __iter__ (line 20) | def __iter__(self): FILE: lichee/eval.py function parse_args (line 8) | def parse_args(): function run (line 28) | def run(): FILE: lichee/model/model_base.py class BaseModel (line 5) | class BaseModel(torch.nn.Module): method __init__ (line 10) | def __init__(self, cfg): method set_requires_grad (line 18) | def set_requires_grad(self, requires_grad): method forward (line 23) | def forward(self, input_ids): FILE: lichee/model/torch/model_standard.py class Unit (line 13) | class Unit: method __init__ (line 14) | def __init__(self, idx, name, inputs, outputs): class ModelStandard (line 22) | class ModelStandard(model_base.BaseModel): method __init__ (line 23) | def __init__(self, cfg, requires_grad=False): method build_representations (line 46) | def build_representations(self): method build_cls (line 73) | def build_cls(self): method build_graph_units (line 77) | def build_graph_units(self): method build_topo_units (line 109) | def build_topo_units(self): method forward (line 138) | def forward(self, inputs): method independent_lr_parameters (line 171) | def independent_lr_parameters(self): FILE: lichee/module/torch/layer/activation.py function gelu (line 10) | def gelu(x): function relu (line 19) | def relu(x): FILE: lichee/module/torch/layer/brick.py function yolo_init_weight (line 8) | def yolo_init_weight(model): class Conv2dBatchLeaky (line 22) | class Conv2dBatchLeaky(nn.Module): method __init__ (line 34) | def __init__(self, in_channels, out_channels, kernel_size, stride, lea... method __repr__ (line 55) | def __repr__(self): method forward (line 60) | def forward(self, x): class ResConv2dBatchLeaky (line 66) | class ResConv2dBatchLeaky(nn.Module): method __init__ (line 68) | def __init__(self, in_channels, inter_channels, kernel_size, stride=1,... method forward (line 88) | def forward(self, x): class Mish (line 105) | class Mish(nn.Module): method __init__ (line 106) | def __init__(self): method forward (line 109) | def forward(self, x): class Conv2dBatchMish (line 113) | class Conv2dBatchMish(nn.Module): method __init__ (line 125) | def __init__(self, in_channels, out_channels, kernel_size, stride=1): method __repr__ (line 145) | def __repr__(self): method forward (line 149) | def forward(self, x): class Resblock (line 155) | class Resblock(nn.Module): method __init__ (line 156) | def __init__(self, channels, hidden_channels=None): method forward (line 167) | def forward(self, x): class Resblock_body (line 172) | class Resblock_body(nn.Module): method __init__ (line 175) | def __init__(self, in_channels, out_channels, num_blocks, first): method forward (line 198) | def forward(self, x): class SpatialPyramidPooling (line 209) | class SpatialPyramidPooling(nn.Module): method __init__ (line 210) | def __init__(self, pool_sizes=[5, 9, 13]): method forward (line 215) | def forward(self, x): class MakeNConv (line 222) | class MakeNConv(nn.Module): method __init__ (line 223) | def __init__(self, filters_list, in_filters, n): method forward (line 243) | def forward(self, x): class Transition (line 247) | class Transition(nn.Module): method __init__ (line 249) | def __init__(self, nchannels): method forward (line 259) | def forward(self, data): class FuseStage (line 264) | class FuseStage(nn.Module): method __init__ (line 267) | def __init__(self, in_filter, is_reversal=False): method forward (line 276) | def forward(self, data): class PaddedMaxPool2d (line 285) | class PaddedMaxPool2d(nn.Module): method __init__ (line 294) | def __init__(self, kernel_size, stride=None, padding=(0, 0, 0, 0), dil... method __repr__ (line 301) | def __repr__(self): method forward (line 305) | def forward(self, x): class Reorg (line 310) | class Reorg(nn.Module): method __init__ (line 317) | def __init__(self, stride=2): method __repr__ (line 324) | def __repr__(self): method forward (line 327) | def forward(self, x): class StageBlock (line 354) | class StageBlock(nn.Module): method __init__ (line 357) | def __init__(self, nchannels): method forward (line 364) | def forward(self, data): class Stage (line 368) | class Stage(nn.Module): method __init__ (line 371) | def __init__(self, nchannels, nblocks, stride=2): method forward (line 379) | def forward(self, data): class HeadBody (line 383) | class HeadBody(nn.Module): method __init__ (line 386) | def __init__(self, nchannels, first_head=False): method forward (line 402) | def forward(self, data): class Head (line 407) | class Head(nn.Module): method __init__ (line 408) | def __init__(self, nchannels, nanchors, nclasses): method forward (line 417) | def forward(self, data): class WeightLoader (line 425) | class WeightLoader: method __init__ (line 428) | def __init__(self, filename): method load_layer (line 455) | def load_layer(self, layer): method _load_conv (line 468) | def _load_conv(self, model): method _load_convbatch (line 479) | def _load_convbatch(self, model): method _load_fc (line 499) | def _load_fc(self, model): class Hswish (line 515) | class Hswish(nn.Module): method __init__ (line 516) | def __init__(self, inplace=True): method forward (line 520) | def forward(self, x): class Identity (line 525) | class Identity(nn.Module): method __init__ (line 526) | def __init__(self, *args, **kwargs): method forward (line 529) | def forward(self, input): function autopad (line 533) | def autopad(k, p=None): # kernel, padding class Conv (line 540) | class Conv(nn.Module): method __init__ (line 542) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True): # ch_in,... method forward (line 549) | def forward(self, x): class Concat (line 553) | class Concat(nn.Module): method __init__ (line 555) | def __init__(self, dimension=1): method forward (line 559) | def forward(self, x): class Focus (line 563) | class Focus(nn.Module): method __init__ (line 565) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True): # ch_in,... method forward (line 569) | def forward(self, x): # x(b,c,w,h) -> y(b,4c,w/2,h/2) class SPP (line 573) | class SPP(nn.Module): method __init__ (line 575) | def __init__(self, c1, c2, k=(5, 9, 13)): method forward (line 582) | def forward(self, x): class Bottleneck (line 587) | class Bottleneck(nn.Module): method __init__ (line 589) | def __init__(self, c1, c2, shortcut=True, g=1, e=0.5): # ch_in, ch_ou... method forward (line 596) | def forward(self, x): class BottleneckCSP (line 600) | class BottleneckCSP(nn.Module): method __init__ (line 602) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): # ch_in, ... method forward (line 614) | def forward(self, x): FILE: lichee/module/torch/layer/classifier.py class ClassifierBasic (line 5) | class ClassifierBasic(torch.nn.Module): method __init__ (line 6) | def __init__(self, hidden_size, num_class, dropout_rate=0.1): method forward (line 11) | def forward(self, encoding): FILE: lichee/module/torch/layer/crf.py class CRF (line 6) | class CRF(nn.Module): method __init__ (line 29) | def __init__(self, num_tags: int, batch_first: bool = False) -> None: method reset_parameters (line 41) | def reset_parameters(self) -> None: method __repr__ (line 50) | def __repr__(self) -> str: method forward (line 53) | def forward(self, emissions: torch.Tensor, method decode (line 104) | def decode(self, emissions: torch.Tensor, method _validate (line 140) | def _validate(self, emissions: torch.Tensor, method _compute_score (line 166) | def _compute_score(self, emissions: torch.Tensor, method _compute_normalizer (line 199) | def _compute_normalizer(self, emissions: torch.Tensor, method _viterbi_decode (line 245) | def _viterbi_decode(self, emissions: torch.Tensor, method _viterbi_decode_nbest (line 327) | def _viterbi_decode_nbest(self, emissions: torch.Tensor, FILE: lichee/module/torch/layer/det_conv_module.py function _fuse_conv_bn (line 8) | def _fuse_conv_bn(conv, bn): function fuse_conv_bn (line 27) | def fuse_conv_bn(module): function kaiming_init (line 59) | def kaiming_init(module, function constant_init (line 76) | def constant_init(module, val, bias=0): class ConvModule (line 83) | class ConvModule(nn.Module): method __init__ (line 124) | def __init__(self, method norm (line 225) | def norm(self): method init_weights (line 228) | def init_weights(self): method forward (line 248) | def forward(self, x, activate=True, norm=True): FILE: lichee/module/torch/layer/det_resnet_block.py class ResBlock (line 6) | class ResBlock(nn.Module): method __init__ (line 22) | def __init__(self, method forward (line 37) | def forward(self, x): FILE: lichee/module/torch/layer/det_yolo_block.py class DetYoloBlock (line 6) | class DetYoloBlock(nn.Module): method __init__ (line 25) | def __init__(self, method forward (line 43) | def forward(self, x): FILE: lichee/module/torch/layer/embedding.py class WordEmbedding (line 8) | class WordEmbedding(torch.nn.Module): method __init__ (line 9) | def __init__(self, vocab_size, embedding_dim, w2v_vectors_path=None, i... method forward (line 22) | def forward(self, token_ids): class BERTEmbedding (line 26) | class BERTEmbedding(torch.nn.Module): method __init__ (line 36) | def __init__(self, cfg): method forward (line 51) | def forward(self, input_ids, token_type_ids): class BertEmbeddingMixGrained (line 66) | class BertEmbeddingMixGrained(torch.nn.Module): method __init__ (line 76) | def __init__(self, cfg): method forward (line 94) | def forward(self, mix_input_ids, token_type_ids): FILE: lichee/module/torch/layer/longformer.py class Longformer (line 8) | class Longformer(torch.nn.Module): method __init__ (line 22) | def __init__(self, cfg, layer_id=0): method forward (line 28) | def forward(self, hidden_states, attention_mask): class LongformerAttention (line 49) | class LongformerAttention(torch.nn.Module): method __init__ (line 50) | def __init__(self, cfg, layer_id=0): method forward (line 55) | def forward(self, input_tensor, attention_mask): class LongformerSelfOutput (line 61) | class LongformerSelfOutput(TransformerSelfOutput): method __init__ (line 62) | def __init__(self, cfg): class LongformerIntermediate (line 66) | class LongformerIntermediate(TransformerIntermediate): method __init__ (line 67) | def __init__(self, cfg): class LongformerOutput (line 71) | class LongformerOutput(TransformerOutput): method __init__ (line 72) | def __init__(self, cfg): FILE: lichee/module/torch/layer/longformer_multi_headed_attn.py function nonzero_tuple (line 12) | def nonzero_tuple(x): class LongformerSelfAttention (line 18) | class LongformerSelfAttention(torch.nn.Module): method __init__ (line 19) | def __init__(self, cfg, layer_id): method forward (line 52) | def forward( method _pad_and_transpose_last_two_dims (line 212) | def _pad_and_transpose_last_two_dims(self, hidden_states_padded, paddi... method _pad_and_diagonalize (line 223) | def _pad_and_diagonalize(self, chunked_hidden_states): method _chunk (line 254) | def _chunk(self, hidden_states, window_overlap: int): method _mask_invalid_locations (line 274) | def _mask_invalid_locations(self, input_tensor, affected_seq_len: int): method _sliding_chunks_query_key_matmul (line 286) | def _sliding_chunks_query_key_matmul(self, query: torch.Tensor, key: t... method _sliding_chunks_matmul_attn (line 351) | def _sliding_chunks_matmul_attn( method _get_global_attn_indices (line 390) | def _get_global_attn_indices(self, is_index_global_attn): method _concat_with_global_key_attn_probs (line 418) | def _concat_with_global_key_attn_probs( method _compute_attn_output (line 445) | def _compute_attn_output( method _compute_global_attn_output (line 481) | def _compute_global_attn_output( FILE: lichee/module/torch/layer/multi_head_attention.py class MultiHeadedAttention (line 7) | class MultiHeadedAttention(torch.nn.Module): method __init__ (line 9) | def __init__(self, cfg): method transpose_for_scores (line 27) | def transpose_for_scores(self, x): method forward (line 32) | def forward(self, hidden_states, attention_mask): FILE: lichee/module/torch/layer/normalization.py class LayerNorm (line 6) | class LayerNorm(nn.Module): method __init__ (line 7) | def __init__(self, hidden_size, eps=1e-6): method forward (line 13) | def forward(self, x): class LayerNorm2 (line 19) | class LayerNorm2(torch.nn.Module): method __init__ (line 20) | def __init__(self, hidden_size, variance_epsilon=1e-12): method forward (line 29) | def forward(self, x): FILE: lichee/module/torch/layer/tokenizer/seg_utils.py class SegUtils (line 14) | class SegUtils: method __init__ (line 20) | def __init__(self, qqseg_path, init_mode=0): method init_handle (line 50) | def init_handle(self): method mix_seg (line 64) | def mix_seg(cls, text): method mix_seg_with_pos (line 80) | def mix_seg_with_pos(cls, text): method basic_seg (line 99) | def basic_seg(cls, text): method basic_seg_with_pos (line 115) | def basic_seg_with_pos(cls, text): method phrase_seg (line 133) | def phrase_seg(cls): method n_gram (line 159) | def n_gram(cls, words, max_n=1): method destroy_handle (line 174) | def destroy_handle(cls): FILE: lichee/module/torch/layer/tokenizer/tokenizer_base.py class BaseTokenizer (line 7) | class BaseTokenizer(ABC): method __init__ (line 17) | def __init__(self): method tokenize (line 21) | def tokenize(self, text): method convert_tokens_to_ids (line 25) | def convert_tokens_to_ids(self, tokens): FILE: lichee/module/torch/layer/tokenizer/tokenizer_bert.py class TokenizerBert (line 8) | class TokenizerBert(BaseTokenizer): method __init__ (line 22) | def __init__(self, cfg, do_lower_case=True): method tokenize (line 29) | def tokenize(self, text): method convert_tokens_to_ids (line 37) | def convert_tokens_to_ids(self, tokens): class BasicTokenizer (line 44) | class BasicTokenizer(object): method __init__ (line 45) | def __init__(self, do_lower_case=True): method tokenize (line 48) | def tokenize(self, text, cn_space_split=True): method _run_strip_accents (line 63) | def _run_strip_accents(self, text): method _run_split_on_punc (line 73) | def _run_split_on_punc(self, text): method _tokenize_chinese_chars (line 92) | def _tokenize_chinese_chars(self, text, space_split=True): method _is_chinese_char (line 105) | def _is_chinese_char(self, cp): method _clean_text (line 119) | def _clean_text(self, text): class WordpieceTokenizer (line 133) | class WordpieceTokenizer(object): method __init__ (line 134) | def __init__(self, vocab, unk_token="[UNK]", max_input_chars_per_word=... method tokenize (line 139) | def tokenize(self, text): class CharTokenizer (line 176) | class CharTokenizer(object): method __init__ (line 177) | def __init__(self, cfg, do_lower_case=True): method get_tokenizer_mode (line 182) | def get_tokenizer_mode(self): method tokenize (line 185) | def tokenize(self, text): method convert_tokens_to_ids (line 190) | def convert_tokens_to_ids(self, tokens): FILE: lichee/module/torch/layer/tokenizer/tokenizer_bert_mix_grained.py class TokenizerBertMixgrained (line 12) | class TokenizerBertMixgrained(BaseTokenizer): method __init__ (line 31) | def __init__(self, cfg): method tokenize (line 56) | def tokenize(self, text, text_pair=False): method proc_seg (line 116) | def proc_seg(self, clean_text): method get_wwm_bio (line 129) | def get_wwm_bio(self, text): method is_all_chinese (line 160) | def is_all_chinese(self, text): method get_vocab (line 168) | def get_vocab(self): method convert_tokens_to_ids (line 171) | def convert_tokens_to_ids(self, tokens): FILE: lichee/module/torch/layer/tokenizer/tokenizer_utils.py function whitespace_tokenize (line 12) | def whitespace_tokenize(text): function is_whitespace (line 21) | def is_whitespace(char): function is_control (line 33) | def is_control(char): function is_punctuation (line 45) | def is_punctuation(char): function convert_to_unicode (line 61) | def convert_to_unicode(text): function printable_text (line 80) | def printable_text(text): class Vocab (line 99) | class Vocab(object): method __init__ (line 103) | def __init__(self): method load (line 107) | def load(self, vocab_path): method get (line 115) | def get(self, w): method __getitem__ (line 118) | def __getitem__(self, w): method __len__ (line 121) | def __len__(self): class CoarseVocab (line 125) | class CoarseVocab(object): method __init__ (line 129) | def __init__(self): method load (line 133) | def load(self, coarse_vocab_path, index_offset=0): method get (line 141) | def get(self, w): method __getitem__ (line 144) | def __getitem__(self, w): method __len__ (line 147) | def __len__(self): function load_vocab (line 151) | def load_vocab(vocab_file): FILE: lichee/module/torch/layer/transformer.py class Transformer (line 9) | class Transformer(torch.nn.Module): method __init__ (line 13) | def __init__(self, cfg): method forward (line 19) | def forward(self, hidden_states, attention_mask): class TransformerAttention (line 26) | class TransformerAttention(torch.nn.Module): method __init__ (line 30) | def __init__(self, cfg): method forward (line 35) | def forward(self, input_tensor, attention_mask): class TransformerSelfOutput (line 41) | class TransformerSelfOutput(torch.nn.Module): method __init__ (line 45) | def __init__(self, cfg): method forward (line 51) | def forward(self, hidden_states, input_tensor): class TransformerIntermediate (line 58) | class TransformerIntermediate(torch.nn.Module): method __init__ (line 62) | def __init__(self, cfg): method forward (line 67) | def forward(self, hidden_states): class TransformerOutput (line 73) | class TransformerOutput(torch.nn.Module): method __init__ (line 77) | def __init__(self, cfg): method forward (line 83) | def forward(self, hidden_states, input_tensor): FILE: lichee/module/torch/loss/det_loss.py function reduce_loss (line 10) | def reduce_loss(loss, reduction): function weight_reduce_loss (line 29) | def weight_reduce_loss(loss, weight=None, reduction='mean', avg_factor=N... function cross_entropy (line 59) | def cross_entropy(pred, function _expand_onehot_labels (line 96) | def _expand_onehot_labels(labels, label_weights, label_channels): function _expand_onehot_seg_labels (line 113) | def _expand_onehot_seg_labels(labels, label_weights, target_shape, ignor... function binary_cross_entropy (line 136) | def binary_cross_entropy(pred, function mask_cross_entropy (line 182) | def mask_cross_entropy(pred, class CrossEntropyLoss (line 220) | class CrossEntropyLoss(nn.Module): method __init__ (line 222) | def __init__(self, method set_config_default (line 258) | def set_config_default(cls, cfg_dict): method build (line 271) | def build(cls, cfg_dict): method forward (line 280) | def forward(self, function mse_loss (line 319) | def mse_loss(pred, class MSELoss (line 331) | class MSELoss(nn.Module): method __init__ (line 339) | def __init__(self, reduction='mean', loss_weight=1.0): method set_config_default (line 345) | def set_config_default(cls, cfg_dict): method build (line 355) | def build(cls, cfg_dict): method forward (line 362) | def forward(self, pred, target, weight=None, avg_factor=None): FILE: lichee/module/torch/loss/loss.py class MSELoss (line 11) | class MSELoss: method build (line 14) | def build(cls, cfg): class CrossEntropyLoss (line 19) | class CrossEntropyLoss: method build (line 22) | def build(cls, cfg): class NLLLoss (line 27) | class NLLLoss: method build (line 30) | def build(cls, cfg): class BinaryCrossEntropyLoss (line 35) | class BinaryCrossEntropyLoss: method build (line 38) | def build(cls, cfg): class BinaryFocalLoss (line 43) | class BinaryFocalLoss(nn.Module): method __init__ (line 57) | def __init__(self, alpha=[1.0, 1.0], gamma=2, ignore_index=None, reduc... method set_config_default (line 85) | def set_config_default(cls, cfg): method build (line 95) | def build(cls, cfg): method forward (line 102) | def forward(self, output, target): class FocalLoss (line 130) | class FocalLoss(nn.Module): method __init__ (line 143) | def __init__(self, num_class, alpha=[0.25, 0.75], gamma=2, balance_ind... method set_config_default (line 167) | def set_config_default(cls, cfg): method build (line 177) | def build(cls, cfg): method forward (line 185) | def forward(self, logit, target): FILE: lichee/module/torch/metrics/accuracy_metrics.py class AccuracyMetrics (line 11) | class AccuracyMetrics(BaseMetrics): method __init__ (line 21) | def __init__(self): method calc (line 24) | def calc(self, threshold=0.5): method name (line 66) | def name(self): FILE: lichee/module/torch/metrics/metrics_base.py class BaseMetrics (line 5) | class BaseMetrics: method __init__ (line 6) | def __init__(self): method calc (line 10) | def calc(self): method collect (line 13) | def collect(self, labels, logits): method name (line 32) | def name(self): FILE: lichee/module/torch/metrics/prf_metrics.py class PRFMetrics (line 10) | class PRFMetrics(BaseMetrics): method __init__ (line 21) | def __init__(self): method calc (line 24) | def calc(self, threshold=0.5): method name (line 57) | def name(self): function confusion_metric (line 61) | def confusion_metric(labels, preds, num_class=None, sum_metric_drop_clas... function multi_label_metric (line 123) | def multi_label_metric(labels, preds): function f4 (line 139) | def f4(f): FILE: lichee/module/torch/metrics/roc_auc_metrics.py class ROCAUCMetrics (line 12) | class ROCAUCMetrics(BaseMetrics): method __init__ (line 23) | def __init__(self): method calc (line 26) | def calc(self): method name (line 55) | def name(self): FILE: lichee/module/torch/metrics/topk_metrics.py class TOPKMetrics (line 11) | class TOPKMetrics(BaseMetrics): method __init__ (line 12) | def __init__(self): method calc (line 15) | def calc(self, k=2): method name (line 62) | def name(self): FILE: lichee/module/torch/op/anchor_generator.py class AnchorGenerator (line 7) | class AnchorGenerator(object): method __init__ (line 55) | def __init__(self, method num_base_anchors (line 110) | def num_base_anchors(self): method num_levels (line 115) | def num_levels(self): method gen_base_anchors (line 119) | def gen_base_anchors(self): method gen_single_level_base_anchors (line 139) | def gen_single_level_base_anchors(self, method _meshgrid (line 184) | def _meshgrid(self, x, y, row_major=True): method grid_anchors (line 203) | def grid_anchors(self, featmap_sizes, device='cuda'): method single_level_grid_anchors (line 229) | def single_level_grid_anchors(self, method valid_flags (line 270) | def valid_flags(self, featmap_sizes, pad_shape, device='cuda'): method single_level_valid_flags (line 297) | def single_level_valid_flags(self, method __repr__ (line 328) | def __repr__(self): class YOLOAnchorGenerator (line 347) | class YOLOAnchorGenerator(AnchorGenerator): method __init__ (line 357) | def __init__(self, strides, base_sizes): method num_levels (line 370) | def num_levels(self): method gen_base_anchors (line 374) | def gen_base_anchors(self): method gen_single_level_base_anchors (line 391) | def gen_single_level_base_anchors(self, base_sizes_per_level, center=N... method responsible_flags (line 419) | def responsible_flags(self, featmap_sizes, gt_bboxes, device='cuda'): method single_level_responsible_flags (line 444) | def single_level_responsible_flags(self, FILE: lichee/module/torch/op/bbox_coder.py function _make_grid (line 6) | def _make_grid(nx=20, ny=20): class BaseBBoxCoder (line 11) | class BaseBBoxCoder(metaclass=ABCMeta): method __init__ (line 14) | def __init__(self, **kwargs): method encode (line 18) | def encode(self, bboxes, gt_bboxes): method decode (line 23) | def decode(self, bboxes, bboxes_pred): class YOLOBBoxCoder (line 29) | class YOLOBBoxCoder(BaseBBoxCoder): method __init__ (line 41) | def __init__(self, eps=1e-6, scale_x_y=1.0): method encode (line 46) | def encode(self, bboxes, gt_bboxes, stride): method decode (line 80) | def decode(self, bboxes, pred_bboxes, stride): FILE: lichee/module/torch/op/nms_ops.py function batched_nms (line 6) | def batched_nms(boxes, scores, idxs, nms_iou_thr, class_agnostic=False): function multiclass_nms (line 57) | def multiclass_nms(multi_bboxes, FILE: lichee/module/torch/op/target_assigner.py function bbox_overlaps (line 6) | def bbox_overlaps(bboxes1, bboxes2, mode='iou', is_aligned=False, eps=1e... class BboxOverlaps2D (line 130) | class BboxOverlaps2D(): method __call__ (line 133) | def __call__(self, bboxes1, bboxes2, mode='iou', is_aligned=False): method __repr__ (line 160) | def __repr__(self): class NiceRepr (line 166) | class NiceRepr(): method __nice__ (line 197) | def __nice__(self): method __repr__ (line 208) | def __repr__(self): method __str__ (line 218) | def __str__(self): class AssignResult (line 229) | class AssignResult(NiceRepr): method __init__ (line 265) | def __init__(self, num_gts, gt_inds, max_overlaps, labels=None): method num_preds (line 274) | def num_preds(self): method set_extra_property (line 278) | def set_extra_property(self, key, value): method get_extra_property (line 283) | def get_extra_property(self, key): method info (line 288) | def info(self): method __nice__ (line 300) | def __nice__(self): method add_gt_ (line 319) | def add_gt_(self, gt_labels): class GridAssigner (line 336) | class GridAssigner(): method __init__ (line 356) | def __init__(self, method assign (line 367) | def assign(self, bboxes, box_responsible_flags, gt_bboxes, gt_labels=N... FILE: lichee/module/torch/op/target_sampler.py class SamplingResult (line 8) | class SamplingResult(NiceRepr): method __init__ (line 11) | def __init__(self, pos_inds, neg_inds, bboxes, gt_bboxes, assign_result, method bboxes (line 38) | def bboxes(self): method to (line 42) | def to(self, device): method __nice__ (line 50) | def __nice__(self): method info (line 59) | def info(self): class BaseSampler (line 72) | class BaseSampler(metaclass=ABCMeta): method __init__ (line 75) | def __init__(self, method _sample_pos (line 89) | def _sample_pos(self, assign_result, num_expected, **kwargs): method _sample_neg (line 94) | def _sample_neg(self, assign_result, num_expected, **kwargs): method sample (line 98) | def sample(self, class PseudoSampler (line 155) | class PseudoSampler(BaseSampler): method __init__ (line 158) | def __init__(self, **kwargs): method _sample_pos (line 161) | def _sample_pos(self, **kwargs): method _sample_neg (line 165) | def _sample_neg(self, **kwargs): method sample (line 169) | def sample(self, assign_result, bboxes, gt_bboxes, **kwargs): FILE: lichee/module/torch/optimizer/optimizer.py class ConfigOptim (line 11) | class ConfigOptim: method config_from_dict (line 14) | def config_from_dict(cls, dict_obj): class SGD (line 23) | class SGD(ConfigOptim): method build (line 26) | def build(cls, model, cfg): class Adam (line 33) | class Adam(ConfigOptim): method build (line 36) | def build(cls, model, cfg): class AdamW (line 46) | class AdamW(ConfigOptim): method build (line 49) | def build(cls, model, cfg): class BertAdamW (line 57) | class BertAdamW(ConfigOptim): method build (line 60) | def build(cls, model, cfg): class BertAdamWDefine (line 77) | class BertAdamWDefine(Optimizer): method __init__ (line 88) | def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-6, weig... method step (line 101) | def step(self, closure=None): FILE: lichee/module/torch/scheduler/lr_scheduler.py class ConstantLRSchedule (line 10) | class ConstantLRSchedule(LambdaLR): method __init__ (line 14) | def __init__(self, optimizer, last_epoch=-1): method build (line 18) | def build(cls, optimizer, cfg): class WarmupConstantSchedule (line 23) | class WarmupConstantSchedule(LambdaLR): method __init__ (line 30) | def __init__(self, optimizer, warmup_steps, last_epoch=-1): method lr_lambda (line 34) | def lr_lambda(self, step): method build (line 40) | def build(cls, optimizer, cfg): class WarmupLinearSchedule (line 51) | class WarmupLinearSchedule(LambdaLR): method __init__ (line 58) | def __init__(self, optimizer, warmup_steps, t_total, last_epoch=-1): method lr_lambda (line 63) | def lr_lambda(self, step): method build (line 69) | def build(cls, optimizer, cfg): FILE: lichee/plugin.py class PluginType (line 12) | class PluginType(IntEnum): class PluginManager (line 55) | class PluginManager: method __init__ (line 58) | def __init__(self): method register (line 61) | def register(self, plugin_type: PluginType, plugin_name: str, plugin_c... method get (line 75) | def get(self, plugin_type: PluginType, plugin_name: str): function register_plugin (line 92) | def register_plugin(plugin_type: PluginType, plugin_name: str): function get_plugin (line 104) | def get_plugin(plugin_type: PluginType, plugin_name: str): FILE: lichee/predict.py function parse_args (line 8) | def parse_args(): function run (line 28) | def run(): FILE: lichee/representation/representation_base.py class BaseRepresentation (line 5) | class BaseRepresentation(torch.nn.Module): method __init__ (line 10) | def __init__(self, representation_cfg): method forward (line 14) | def forward(self, *args, **kwargs): method load_pretrained_model (line 18) | def load_pretrained_model(cls, cfg, pretrained_model_path): method independent_lr_parameters (line 21) | def independent_lr_parameters(self): FILE: lichee/representation/torch/bert.py class BertRepresentation (line 16) | class BertRepresentation(representation_base.BaseRepresentation): method __init__ (line 48) | def __init__(self, representation_cfg): method set_config_default (line 60) | def set_config_default(self): method forward (line 69) | def forward(self, input_ids): method load_pretrained_model (line 95) | def load_pretrained_model(cls, representation_cfg, pretrained_model_pa... method state_dict_remove_pooler (line 104) | def state_dict_remove_pooler(cls, model_weight): class BERTEncoder (line 109) | class BERTEncoder(torch.nn.Module): method __init__ (line 110) | def __init__(self, representation_cfg): method forward (line 115) | def forward(self, hidden_states, attention_mask): class BERTPooler (line 123) | class BERTPooler(torch.nn.Module): method __init__ (line 124) | def __init__(self, representation_cfg): method forward (line 130) | def forward(self, hidden_states): FILE: lichee/representation/torch/common.py function load_pretrained_model_default (line 20) | def load_pretrained_model_default(cls, representation_cfg, pretrained_mo... function state_dict_remove_pooler_default (line 49) | def state_dict_remove_pooler_default(model_weight): FILE: lichee/representation/torch/consensus.py class NetVLADConsensus (line 10) | class NetVLADConsensus(torch.nn.Module): method __init__ (line 11) | def __init__(self, method _init_params (line 26) | def _init_params(self): method forward (line 34) | def forward(self, x): class NeXtVLAD (line 89) | class NeXtVLAD(representation_base.BaseRepresentation): method __init__ (line 91) | def __init__(self, representation_cfg) -> None: method forward (line 112) | def forward(self, inputs): FILE: lichee/representation/torch/cspdarknet.py class DarknetRepresentation (line 18) | class DarknetRepresentation(representation_base.BaseRepresentation): method __init__ (line 45) | def __init__(self, representation_cfg): method forward (line 76) | def forward(self, x): method make_conv_res_block (line 87) | def make_conv_res_block(in_channels, method load_pretrained_model (line 115) | def load_pretrained_model(cls, representation_cfg, pretrained_model_pa... method state_dict_remove_pooler (line 120) | def state_dict_remove_pooler(cls, model_weight): class CSPDarknetRepresentation (line 126) | class CSPDarknetRepresentation(representation_base.BaseRepresentation): method __init__ (line 129) | def __init__(self, representation_cfg): method __modules_recurse (line 151) | def __modules_recurse(self, mod=None): method forward (line 164) | def forward(self, x): method load_pretrained_model (line 175) | def load_pretrained_model(cls, representation_cfg, pretrained_model_pa... method state_dict_remove_pooler (line 188) | def state_dict_remove_pooler(cls, model_weight): FILE: lichee/representation/torch/docbert.py class DocBertRepresentation (line 16) | class DocBertRepresentation(representation_base.BaseRepresentation): method __init__ (line 35) | def __init__(self, representation_cfg): method set_config_default (line 47) | def set_config_default(self): method forward (line 59) | def forward(self, input_ids): method load_pretrained_model (line 94) | def load_pretrained_model(cls, representation_cfg, pretrained_model_pa... method teg_state_dict_convert (line 109) | def teg_state_dict_convert(cls, model_weight): method state_dict_remove_pooler (line 133) | def state_dict_remove_pooler(cls, model_weight): method remove_bert_words (line 139) | def remove_bert_words(cls, model_weight): method converter_gamma_to_weight (line 148) | def converter_gamma_to_weight(cls, model_weight): class DocBERTEncoder (line 165) | class DocBERTEncoder(torch.nn.Module): method __init__ (line 175) | def __init__(self, representation_cfg): method forward (line 180) | def forward(self, hidden_states, attention_mask): class DocBERTPooler (line 202) | class DocBERTPooler(torch.nn.Module): method __init__ (line 213) | def __init__(self, representation_cfg): method forward (line 219) | def forward(self, hidden_states): FILE: lichee/representation/torch/enhance.py class ContextGating (line 9) | class ContextGating(representation_base.BaseRepresentation): method __init__ (line 14) | def __init__(self, representation_cfg) -> None: method forward (line 24) | def forward(self, x): FILE: lichee/task/torch/distill_classification.py class DistillClassification (line 11) | class DistillClassification(torch.nn.Module): method __init__ (line 33) | def __init__(self, target_cfg=None): method init_loss (line 50) | def init_loss(self): method forward (line 59) | def forward(self, *target_inputs): method get_output (line 90) | def get_output(cls, logits): class BERTPooler (line 99) | class BERTPooler(torch.nn.Module): method __init__ (line 100) | def __init__(self, hidden_size): method forward (line 105) | def forward(self, hidden_states): FILE: lichee/task/torch/sequence_label.py class SequenceLabel (line 11) | class SequenceLabel(torch.nn.Module): method __init__ (line 22) | def __init__(self): method forward (line 31) | def forward(self, bert_outputs, token_ids, labels_inputs): FILE: lichee/task/torch/simple_classification.py class BaseSimpleClassification (line 10) | class BaseSimpleClassification(BaseTask): method __init__ (line 28) | def __init__(self): method init_loss (line 37) | def init_loss(self): method init_label (line 44) | def init_label(self, task_name): method forward (line 58) | def forward(self, *args, label_inputs): method forward_helper (line 61) | def forward_helper(self, labels_inputs, logits): class SimpleClassification (line 83) | class SimpleClassification(BaseSimpleClassification): method __init__ (line 87) | def __init__(self, target_cfg=None): method forward (line 93) | def forward(self, representation_outputs, labels_inputs): class BERTPooler (line 101) | class BERTPooler(torch.nn.Module): method __init__ (line 102) | def __init__(self, hidden_size): method forward (line 107) | def forward(self, hidden_states): class SimpleVGGClassification (line 116) | class SimpleVGGClassification(BaseTask): method __init__ (line 120) | def __init__(self, target_cfg=None): method forward (line 133) | def forward(self, representation_outputs, labels_inputs): class SimpleResNetClassification (line 140) | class SimpleResNetClassification(BaseTask): method __init__ (line 144) | def __init__(self, target_cfg=None): method forward (line 151) | def forward(self, representation_outputs, labels_inputs): class SimpleVideoClassification (line 158) | class SimpleVideoClassification(BaseTask): method __init__ (line 162) | def __init__(self, target_cfg=None): method forward (line 169) | def forward(self, representation_outputs, labels_inputs): FILE: lichee/task/torch/task_base.py class BaseTask (line 8) | class BaseTask(nn.Module): method __init__ (line 14) | def __init__(self): method forward (line 17) | def forward(self, *args, label_inputs): method get_output (line 27) | def get_output(cls, logits): FILE: lichee/task/torch/task_output.py class BaseTaskOutput (line 9) | class BaseTaskOutput: method get_outputs (line 11) | def get_outputs(cls, raw_outputs): class SimpleClsOut (line 21) | class SimpleClsOut(BaseTaskOutput): method get_output (line 26) | def get_output(cls, raw_outputs): class DistillClsOut (line 36) | class DistillClsOut(BaseTaskOutput): method get_output (line 41) | def get_output(cls, raw_outputs): FILE: lichee/task/torch/yolo_head.py function normal_init (line 19) | def normal_init(module, mean=0, std=1, bias=0): function images_to_levels (line 25) | def images_to_levels(target, num_levels): class YOLOV3Head (line 41) | class YOLOV3Head(nn.Module): method __init__ (line 44) | def __init__(self, target_cfg=None): method num_levels (line 102) | def num_levels(self): method num_attrib (line 106) | def num_attrib(self): method _init_layers (line 112) | def _init_layers(self): method init_weights (line 129) | def init_weights(self): method forward (line 134) | def forward(self, feats, label_inputs): method get_bboxes (line 174) | def get_bboxes(self, pred_maps, cfg_dict=None, with_nms=True): method _get_bboxes_single (line 203) | def _get_bboxes_single(self, method loss (line 304) | def loss(self, pred_maps, gt_bboxes, gt_labels): method loss_single (line 345) | def loss_single(self, pred_map, target_map, neg_map): method get_targets (line 388) | def get_targets(self, anchor_list, responsible_flag_list, gt_bboxes_list, method _get_targets_single (line 422) | def _get_targets_single(self, anchors, responsible_flags, gt_bboxes, FILE: lichee/train.py function parse_args (line 9) | def parse_args(): function run (line 37) | def run(): FILE: lichee/utils/common.py function is_rank_0 (line 18) | def is_rank_0(): function is_local_rank_0 (line 22) | def is_local_rank_0(): function create_local_file_spinlock (line 26) | def create_local_file_spinlock(filename: str): function get_local_file_spinlock (line 34) | def get_local_file_spinlock(filename: str): function set_seed (line 42) | def set_seed(seed=7): function load_saved_model (line 51) | def load_saved_model(model, saved_model_path, model_file=None): function load_model_dict (line 61) | def load_model_dict(model, model_file): function get_files_sort_by_mtime (line 76) | def get_files_sort_by_mtime(file_dir, fname_key='', reverse=True): function save_model (line 87) | def save_model(save_model_path, model, model_name): function load_word2vec_vector (line 102) | def load_word2vec_vector(vector_file, vector_dim): function output_metric (line 112) | def output_metric(test_outputs, ref_outputs, output_count): function multi_apply (line 137) | def multi_apply(func, *args, **kwargs): FILE: lichee/utils/convertor/convertor_base.py class BaseConvertor (line 2) | class BaseConvertor: method convert (line 13) | def convert(cls, inited_model, trace_inputs, sample_inputs, export_mod... method save_model (line 18) | def save_model(cls, inited_model, trace_inputs, export_model_path): method check_and_infer (line 22) | def check_and_infer(cls, inited_model, valid_data, export_model_path): FILE: lichee/utils/convertor/onnx_convertor.py class ONNXConvertor (line 13) | class ONNXConvertor(convertor_base.BaseConvertor): method save_model (line 15) | def save_model(cls, inited_model, trace_inputs, export_model_path): method check_and_infer (line 39) | def check_and_infer(cls, inited_model, valid_data, export_model_path): FILE: lichee/utils/convertor/torch_nn_convertor.py class TorchNNConvertor (line 12) | class TorchNNConvertor(convertor_base.BaseConvertor): method convert (line 18) | def convert(cls, inited_model, trace_inputs, sample_inputs, export_mod... method save_model (line 37) | def save_model(cls, inited_model, trace_inputs, export_model_path): method check_and_infer (line 48) | def check_and_infer(cls, inited_model, valid_data, export_model_path): FILE: lichee/utils/logging.py function error (line 8) | def error(msg, *args, **kwargs): function warning (line 14) | def warning(msg, *args, **kwargs): function info (line 20) | def info(msg, *args, **kwargs): function debug (line 26) | def debug(msg, *args, **kwargs): FILE: lichee/utils/model_loader/loader_base.py class BaseLoader (line 5) | class BaseLoader(torch.nn.Module): method __init__ (line 10) | def __init__(self, model_path): method forward (line 15) | def forward(self, inputs): FILE: lichee/utils/model_loader/onnx_loader.py class ONNXLoader (line 7) | class ONNXLoader(loader_base.BaseLoader): method __init__ (line 17) | def __init__(self, model_path): method forward (line 22) | def forward(self, inputs): FILE: lichee/utils/model_loader/torch_nn_loader.py class TorchNNLoader (line 7) | class TorchNNLoader(loader_base.BaseLoader): method __init__ (line 17) | def __init__(self, model_path): method forward (line 23) | def forward(self, inputs): FILE: lichee/utils/parallel.py function init_dist (line 10) | def init_dist(backend='nccl', **kwargs): function get_dist_info (line 16) | def get_dist_info(): function get_dict_from_list (line 30) | def get_dict_from_list(src_list): FILE: lichee/utils/singleton.py class Singleton (line 7) | class Singleton(type): method __call__ (line 8) | def __call__(cls, *args, **kwargs): FILE: lichee/utils/storage/http.py class HttpStorage (line 13) | class HttpStorage(storage_base.BaseStorage): method get_file (line 18) | def get_file(cls, url: str): method put_file (line 24) | def put_file(cls, src_file_path: str, dst_file_path: str): class HttpsStorage (line 29) | class HttpsStorage(storage_base.BaseStorage): method get_file (line 34) | def get_file(cls, url: str): method put_file (line 40) | def put_file(cls, src_file_path: str, dst_file_path: str): function download_file (line 44) | def download_file(url): FILE: lichee/utils/storage/local.py class LocalStorage (line 9) | class LocalStorage(storage_base.BaseStorage): method get_file (line 14) | def get_file(cls, file_path): method put_file (line 22) | def put_file(cls, src_file_path: str, dst_file_path: str): FILE: lichee/utils/storage/storage_base.py class BaseStorage (line 5) | class BaseStorage: method get_file (line 7) | def get_file(cls, file_path: str): method put_file (line 11) | def put_file(cls, src_file_path: str, dst_file_path: str): method should_put_file (line 15) | def should_put_file(cls): FILE: lichee/utils/storage/utils.py function get_storage_file (line 6) | def get_storage_file(storage_path: str): function put_storage_file (line 24) | def put_storage_file(local_file_path: str, storage_path: str): function analyse_storage (line 39) | def analyse_storage(storage_path: str) -> (BaseStorage, str): FILE: lichee/utils/sys_tmpfile.py function get_global_remote_dir (line 13) | def get_global_remote_dir(): function get_remote_file_path (line 22) | def get_remote_file_path(filename): function get_global_temp_dir (line 31) | def get_global_temp_dir(): function get_temp_file_path_once (line 40) | def get_temp_file_path_once(): function get_temp_dir_once (line 49) | def get_temp_dir_once(): function get_global_temp_lock_dir (line 59) | def get_global_temp_lock_dir(): function create_temp_lock_file (line 68) | def create_temp_lock_file(filename: str): function exist_temp_lock_file (line 79) | def exist_temp_lock_file(filename: str): function clear_tmp_files (line 88) | def clear_tmp_files(): FILE: lichee/utils/tfrecord/iterator_utils.py function cycle (line 13) | def cycle(iterator_fn: typing.Callable) -> typing.Iterable[typing.Any]: function sample_iterators (line 21) | def sample_iterators(iterators: typing.List[typing.Iterator], function shuffle_iterator (line 50) | def shuffle_iterator(iterator: typing.Iterator, FILE: lichee/utils/tfrecord/reader.py function tfrecord_iterator (line 18) | def tfrecord_iterator(data_path: str, function read_single_record_with_spec_index (line 96) | def read_single_record_with_spec_index(data_path: str, function read_single_description (line 162) | def read_single_description(description, record, typename_mapping): function tfrecord_loader (line 202) | def tfrecord_loader(data_path: str, function multi_tfrecord_loader (line 258) | def multi_tfrecord_loader(data_pattern: str, FILE: lichee/utils/tfrecord/tools/tfrecord2idx.py function create_index (line 8) | def create_index(tfrecord_file: str, index_file: str) -> None: function main (line 43) | def main(): FILE: lichee/utils/tfrecord/torch/dataset.py class TFRecordDataset (line 13) | class TFRecordDataset(torch.utils.data.IterableDataset): method __init__ (line 44) | def __init__(self, method __iter__ (line 58) | def __iter__(self): class MultiTFRecordDataset (line 74) | class MultiTFRecordDataset(torch.utils.data.IterableDataset): method __init__ (line 110) | def __init__(self, method __iter__ (line 125) | def __iter__(self): FILE: lichee/utils/tfrecord/writer.py class TFRecordWriter (line 17) | class TFRecordWriter: method __init__ (line 26) | def __init__(self, data_path: str) -> None: method close (line 29) | def close(self) -> None: method write (line 33) | def write(self, datum: typing.Dict[str, typing.Tuple[typing.Any, str]]... method masked_crc (line 51) | def masked_crc(data: bytes) -> bytes: method serialize_tf_example (line 61) | def serialize_tf_example(datum: typing.Dict[str, typing.Tuple[typing.A... FILE: setup.py function read_version (line 17) | def read_version():