from vedastr.utils import Registry TRANSFORMER_ENCODER_LAYERS = Registry('transformer_encoder_layer') TRANSFORMER_DECODER_LAYERS = Registry('transformer_decoder_layer')
from vedastr.utils import Registry DECODERS = Registry('decoder')
from vedastr.utils import Registry SEQUENCE_DECODERS = Registry('sequence_decoder')
from vedastr.utils import Registry TRANSFORMS = Registry('transforms')
from vedastr.utils import Registry BRICKS = Registry('brick')
from vedastr.utils import Registry CONVERTERS = Registry('convert')
from vedastr.utils import Registry DATASETS = Registry('dataset')
from vedastr.utils import Registry SAMPLER = Registry('sampler')
from vedastr.utils import Registry TRANSFORMER_ATTENTIONS = Registry('transformer_attention')
from vedastr.utils import Registry BACKBONES = Registry('backbone')
from vedastr.utils import Registry SEQUENCE_ENCODERS = Registry('sequence_encoder')
from vedastr.utils import Registry POSITION_ENCODERS = Registry('position_encoder')
from vedastr.utils import Registry DATALOADERS = Registry('dataloader')
from vedastr.utils import Registry TRANSFORMER_FEEDFORWARDS = Registry('transformer_feedforward')
from vedastr.utils import Registry UTILS = Registry('utils')
import torch.nn as nn from vedastr.utils import Registry CRITERIA = Registry('criterion') # CTCLoss = nn.CTCLoss # CRITERIA.register_module(CTCLoss) # # # CrossEntropyLoss = nn.CrossEntropyLoss # CRITERIA.register_module(CrossEntropyLoss)
from torch.optim import lr_scheduler from vedastr.utils import Registry LR_SCHEDULERS = Registry('lr_scheduler')
from vedastr.utils import Registry RECTIFICATORS = Registry('Rectificator')
from vedastr.utils import Registry METRICS = Registry('metrics')
from vedastr.utils import Registry RUNNERS = Registry('runner')
from vedastr.utils import Registry ENHANCE_MODULES = Registry('enhance_module')
from vedastr.utils import Registry COMPONENT = Registry('component') BODIES = Registry('body')