SYMBOL INDEX (231 symbols across 21 files) FILE: callbacks.py class IterationCallback (line 18) | class IterationCallback(LearnerTensorboardWriter): method __init__ (line 20) | def __init__(self, learn:Learner, name:str='model', checpoint_keep_num=5, method _write_metrics (line 36) | def _write_metrics(self, iteration:int, names:List[str], last_metrics:... method _write_sub_loss (line 43) | def _write_sub_loss(self, iteration:int, last_losses:dict)->None: method _save (line 50) | def _save(self, name): method _validate (line 58) | def _validate(self, dl=None, callbacks=None, metrics=None, keeped_item... method jump_to_epoch_iter (line 70) | def jump_to_epoch_iter(self, epoch:int, iteration:int)->None: method on_train_begin (line 76) | def on_train_begin(self, n_epochs, **kwargs): method on_batch_begin (line 88) | def on_batch_begin(self, **kwargs:Any)->None: method on_batch_end (line 92) | def on_batch_end(self, iteration, epoch, last_loss, smooth_loss, train... method on_train_end (line 159) | def on_train_end(self, **kwargs): method on_epoch_end (line 163) | def on_epoch_end(self, last_metrics:MetricsList, iteration:int, **kwar... class TextAccuracy (line 167) | class TextAccuracy(Callback): method __init__ (line 169) | def __init__(self, charset_path, max_length, case_sensitive, model_eval): method on_epoch_begin (line 179) | def on_epoch_begin(self, **kwargs): method _get_output (line 187) | def _get_output(self, last_output): method _update_output (line 194) | def _update_output(self, last_output, items): method on_batch_end (line 201) | def on_batch_end(self, last_output, last_target, **kwargs): method on_epoch_end (line 231) | def on_epoch_end(self, last_metrics, **kwargs): method decode (line 239) | def decode(self, logit): class TopKTextAccuracy (line 255) | class TopKTextAccuracy(TextAccuracy): method __init__ (line 257) | def __init__(self, k, charset_path, max_length, case_sensitive, model_... method on_epoch_begin (line 265) | def on_epoch_begin(self, **kwargs): method on_batch_end (line 271) | def on_batch_end(self, last_output, last_target, **kwargs): method on_epoch_end (line 287) | def on_epoch_end(self, last_metrics, **kwargs): class DumpPrediction (line 294) | class DumpPrediction(LearnerCallback): method __init__ (line 296) | def __init__(self, learn, dataset, charset_path, model_eval, image_onl... method on_batch_end (line 315) | def on_batch_end(self, last_input, last_output, last_target, **kwargs): FILE: dataset.py class ImageDataset (line 14) | class ImageDataset(Dataset): method __init__ (line 17) | def __init__(self, method __len__ (line 59) | def __len__(self): method _next_image (line 62) | def _next_image(self, index): method _check_image (line 66) | def _check_image(self, x, pixels=6): method resize_multiscales (line 72) | def resize_multiscales(self, img, borderType=cv2.BORDER_CONSTANT): method resize (line 99) | def resize(self, img): method get (line 105) | def get(self, idx): method _process_training (line 136) | def _process_training(self, image): method _process_test (line 141) | def _process_test(self, image): method __getitem__ (line 144) | def __getitem__(self, idx): class TextDataset (line 168) | class TextDataset(Dataset): method __init__ (line 169) | def __init__(self, method __len__ (line 193) | def __len__(self): method __getitem__ (line 196) | def __getitem__(self, idx): method prob_smooth_label (line 222) | def prob_smooth_label(self, one_hot): class SpellingMutation (line 232) | class SpellingMutation(object): method __init__ (line 233) | def __init__(self, pn0=0.7, pn1=0.85, pn2=0.95, pt0=0.7, pt1=0.85, cha... method is_digit (line 251) | def is_digit(self, text, ratio=0.5): method is_unk_char (line 257) | def is_unk_char(self, char): method get_num_to_modify (line 261) | def get_num_to_modify(self, length): method __call__ (line 280) | def __call__(self, text, debug=False): FILE: demo.py function get_model (line 14) | def get_model(config): function preprocess (line 24) | def preprocess(img, width, height): function postprocess (line 31) | def postprocess(output, charset, model_eval): function load (line 57) | def load(model, file, device=None, strict=True): function main (line 67) | def main(): FILE: demo_onnx.py class WordAccuary (line 22) | class WordAccuary: method __init__ (line 24) | def __init__(self, case_sensitive=False): method update (line 30) | def update(self, y_pred: List[str], y: List[str]): method compute (line 41) | def compute(self): method reset (line 44) | def reset(self): function _decode (line 49) | def _decode(logit): function preprocess (line 62) | def preprocess(img, width, height): FILE: export_onnx.py function get_model (line 10) | def get_model(config): function load (line 20) | def load(model, file, device=None, strict=True): FILE: losses.py class MultiLosses (line 6) | class MultiLosses(nn.Module): method __init__ (line 7) | def __init__(self, one_hot=True): method last_losses (line 13) | def last_losses(self): method _flatten (line 16) | def _flatten(self, sources, lengths): method _merge_list (line 19) | def _merge_list(self, all_res): method _ce_loss (line 31) | def _ce_loss(self, output, gt_labels, gt_lengths, idx=None, record=True): method forward (line 52) | def forward(self, outputs, *args): class SoftCrossEntropyLoss (line 61) | class SoftCrossEntropyLoss(nn.Module): method __init__ (line 62) | def __init__(self, reduction="mean"): method forward (line 66) | def forward(self, input, target, softmax=True): FILE: main.py function _set_random_seed (line 18) | def _set_random_seed(seed): function _get_training_phases (line 26) | def _get_training_phases(config, n): function _get_dataset (line 34) | def _get_dataset(ds_type, paths, is_training, config, **kwargs): function _get_language_databaunch (line 52) | def _get_language_databaunch(config): function _get_databaunch (line 77) | def _get_databaunch(config): function _get_model (line 98) | def _get_model(config): function _get_learner (line 108) | def _get_learner(config, data, model, local_rank=None): function main (line 187) | def main(): FILE: modules/attention.py class Attention (line 5) | class Attention(nn.Module): method __init__ (line 6) | def __init__(self, in_channels=512, max_length=25, n_feature=256): method forward (line 18) | def forward(self, enc_output): function encoder_layer (line 33) | def encoder_layer(in_c, out_c, k=3, s=2, p=1): function decoder_layer (line 38) | def decoder_layer(in_c, out_c, k=3, s=1, p=1, mode='nearest', scale_fact... class PositionAttention (line 47) | class PositionAttention(nn.Module): method __init__ (line 48) | def __init__(self, max_length, in_channels=512, num_channels=64, method forward (line 68) | def forward(self, x): FILE: modules/backbone.py class ResTranformer (line 10) | class ResTranformer(nn.Module): method __init__ (line 11) | def __init__(self, config): method forward (line 27) | def forward(self, images): FILE: modules/model.py class Model (line 11) | class Model(nn.Module): method __init__ (line 13) | def __init__(self, config): method load (line 18) | def load(self, source, device=None, strict=True): method _get_length (line 22) | def _get_length(self, logit): method first_nonzero (line 29) | def first_nonzero(x): method _get_padding_mask (line 36) | def _get_padding_mask(length, max_length): method _get_square_subsequent_mask (line 42) | def _get_square_subsequent_mask(sz, device, diagonal=0, fw=True): method _get_location_mask (line 52) | def _get_location_mask(sz, device=None): FILE: modules/model_abinet.py class ABINetModel (line 8) | class ABINetModel(nn.Module): method __init__ (line 9) | def __init__(self, config): method forward (line 17) | def forward(self, images, *args): FILE: modules/model_abinet_iter.py class ABINetIterModel (line 10) | class ABINetIterModel(nn.Module): method __init__ (line 11) | def __init__(self, config): method forward (line 20) | def forward(self, images, *args): FILE: modules/model_alignment.py class BaseAlignment (line 8) | class BaseAlignment(Model): method __init__ (line 9) | def __init__(self, config): method forward (line 18) | def forward(self, l_feature, v_feature): FILE: modules/model_language.py class BCNLanguage (line 12) | class BCNLanguage(Model): method __init__ (line 13) | def __init__(self, config): method forward (line 41) | def forward(self, tokens, lengths): FILE: modules/model_vision.py class BaseVision (line 11) | class BaseVision(Model): method __init__ (line 12) | def __init__(self, config): method forward (line 40) | def forward(self, images, *args): FILE: modules/resnet.py function conv1x1 (line 8) | def conv1x1(in_planes, out_planes, stride=1): function conv3x3 (line 12) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 18) | class BasicBlock(nn.Module): method __init__ (line 21) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 31) | def forward(self, x): class ResNet (line 50) | class ResNet(nn.Module): method __init__ (line 52) | def __init__(self, block, layers): method _make_layer (line 74) | def _make_layer(self, block, planes, blocks, stride=1): method forward (line 91) | def forward(self, x): function resnet45 (line 103) | def resnet45(): FILE: modules/transformer.py function multi_head_attention_forward (line 15) | def multi_head_attention_forward(query, # type... class MultiheadAttention (line 299) | class MultiheadAttention(Module): method __init__ (line 328) | def __init__(self, embed_dim, num_heads, dropout=0., bias=True, add_bi... method _reset_parameters (line 367) | def _reset_parameters(self): method __setstate__ (line 383) | def __setstate__(self, state): method forward (line 390) | def forward(self, query, key, value, key_padding_mask=None, class Transformer (line 450) | class Transformer(Module): method __init__ (line 479) | def __init__(self, d_model=512, nhead=8, num_encoder_layers=6, method forward (line 503) | def forward(self, src, tgt, src_mask=None, tgt_mask=None, method generate_square_subsequent_mask (line 564) | def generate_square_subsequent_mask(self, sz): method _reset_parameters (line 572) | def _reset_parameters(self): class TransformerEncoder (line 580) | class TransformerEncoder(Module): method __init__ (line 596) | def __init__(self, encoder_layer, num_layers, norm=None): method forward (line 602) | def forward(self, src, mask=None, src_key_padding_mask=None): class TransformerDecoder (line 625) | class TransformerDecoder(Module): method __init__ (line 642) | def __init__(self, decoder_layer, num_layers, norm=None): method forward (line 648) | def forward(self, tgt, memory, memory2=None, tgt_mask=None, class TransformerEncoderLayer (line 679) | class TransformerEncoderLayer(Module): method __init__ (line 700) | def __init__(self, d_model, nhead, dim_feedforward=2048, dropout=0.1, method __setstate__ (line 717) | def __setstate__(self, state): method forward (line 722) | def forward(self, src, src_mask=None, src_key_padding_mask=None): class TransformerDecoderLayer (line 746) | class TransformerDecoderLayer(Module): method __init__ (line 768) | def __init__(self, d_model, nhead, dim_feedforward=2048, dropout=0.1, method __setstate__ (line 792) | def __setstate__(self, state): method forward (line 797) | def forward(self, tgt, memory, tgt_mask=None, memory_mask=None, function _get_clones (line 839) | def _get_clones(module, N): function _get_activation_fn (line 843) | def _get_activation_fn(activation): class PositionalEncoding (line 852) | class PositionalEncoding(nn.Module): method __init__ (line 869) | def __init__(self, d_model, dropout=0.1, max_len=5000): method forward (line 881) | def forward(self, x): FILE: tools/create_language_data.py function is_char (line 20) | def is_char(text, ratio=0.5): function is_digit (line 29) | def is_digit(text, ratio=0.5): function disturb (line 60) | def disturb(word, degree, p=0.3): FILE: tools/create_lmdb_dataset.py function checkImageIsValid (line 11) | def checkImageIsValid(imageBin): function writeCache (line 22) | def writeCache(env, cache): function createDataset (line 28) | def createDataset(inputPath, gtFile, outputPath, checkValid=True, map_si... FILE: transforms.py function sample_asym (line 12) | def sample_asym(magnitude, size=None): function sample_sym (line 15) | def sample_sym(magnitude, size=None): function sample_uniform (line 18) | def sample_uniform(low, high, size=None): function get_interpolation (line 21) | def get_interpolation(type='random'): class CVRandomRotation (line 32) | class CVRandomRotation(object): method __init__ (line 33) | def __init__(self, degrees=15): method get_params (line 39) | def get_params(degrees): method __call__ (line 42) | def __call__(self, img): class CVRandomAffine (line 55) | class CVRandomAffine(object): method __init__ (line 56) | def __init__(self, degrees, translate=None, scale=None, shear=None): method _get_inverse_affine_matrix (line 89) | def _get_inverse_affine_matrix(self, center, angle, translate, scale, ... method get_params (line 129) | def get_params(degrees, translate, scale_ranges, shears, height): method __call__ (line 154) | def __call__(self, img): class CVRandomPerspective (line 185) | class CVRandomPerspective(object): method __init__ (line 186) | def __init__(self, distortion=0.5): method get_params (line 189) | def get_params(self, width, height, distortion): method __call__ (line 201) | def __call__(self, img): class CVRescale (line 218) | class CVRescale(object): method __init__ (line 220) | def __init__(self, factor=4, base_size=(128, 512)): method __call__ (line 236) | def __call__(self, img): class CVGaussianNoise (line 246) | class CVGaussianNoise(object): method __init__ (line 247) | def __init__(self, mean=0, var=20): method __call__ (line 256) | def __call__(self, img): class CVMotionBlur (line 261) | class CVMotionBlur(object): method __init__ (line 262) | def __init__(self, degrees=12, angle=90): method __call__ (line 271) | def __call__(self, img): class CVGeometry (line 281) | class CVGeometry(object): method __init__ (line 282) | def __init__(self, degrees=15, translate=(0.3, 0.3), scale=(0.5, 2.), method __call__ (line 293) | def __call__(self, img): class CVDeterioration (line 299) | class CVDeterioration(object): method __init__ (line 300) | def __init__(self, var, degrees, factor, p=0.5): method __call__ (line 314) | def __call__(self, img): class CVColorJitter (line 321) | class CVColorJitter(object): method __init__ (line 322) | def __init__(self, brightness=0.5, contrast=0.5, saturation=0.5, hue=0... method __call__ (line 327) | def __call__(self, img): FILE: utils.py class CharsetMapper (line 14) | class CharsetMapper(object): method __init__ (line 21) | def __init__(self, method _read_charset (line 40) | def _read_charset(self, filename): method trim (line 64) | def trim(self, text): method get_text (line 68) | def get_text(self, labels, length=None, padding=True, trim=False): method get_labels (line 79) | def get_labels(self, text, length=None, padding=True, case_sensitive=F... method pad_labels (line 90) | def pad_labels(self, labels, length=None): method digits (line 96) | def digits(self): method digit_labels (line 100) | def digit_labels(self): method alphabets (line 104) | def alphabets(self): method alphabet_labels (line 113) | def alphabet_labels(self): class Timer (line 117) | class Timer(object): method __init__ (line 119) | def __init__(self): method tic (line 129) | def tic(self): method toc_data (line 133) | def toc_data(self): method toc_running (line 139) | def toc_running(self): method total_time (line 145) | def total_time(self): method average_time (line 148) | def average_time(self): method average_data_time (line 151) | def average_data_time(self): method average_running_time (line 154) | def average_running_time(self): class Logger (line 158) | class Logger(object): method init (line 163) | def init(output_dir, name, phase): method enable_file (line 175) | def enable_file(): method disable_file (line 181) | def disable_file(): class Config (line 187) | class Config(object): method __init__ (line 189) | def __init__(self, config_path, host=True): method __getattr__ (line 211) | def __getattr__(self, item): method __repr__ (line 224) | def __repr__(self): function blend_mask (line 231) | def blend_mask(image, mask, alpha=0.5, cmap='jet', color='b', color_alph... function onehot (line 253) | def onehot(label, depth, device=None): class MyDataParallel (line 269) | class MyDataParallel(nn.DataParallel): method gather (line 271) | def gather(self, outputs, target_device): class MyConcatDataset (line 302) | class MyConcatDataset(ConcatDataset): method __getattr__ (line 303) | def __getattr__(self, k):