def create_model(cls, sp_config, en_config, vocab_size): from blocks.sp_layers import SPLayer from blocks.encoders import TransformerEncoder splayer = SPLayer(sp_config) encoder = TransformerEncoder(en_config) model = cls(splayer, encoder, vocab_size) return model
def create_model(cls, sp_config, en_config, vocab_size): from blocks.sp_layers import WavConv as SPLayer from blocks.encoders import GRU_Encoder as Encoder splayer = SPLayer(sp_config) encoder = Encoder(en_config) model = cls(splayer, encoder, vocab_size) return model
def create_model(cls, sp_config, en_config, as_cofig, vocab_size): from blocks.sp_layers import SPLayer from blocks.encoders import TransformerEncoder from blocks.attention_assigner import Attention_Assigner splayer = SPLayer(sp_config) encoder = TransformerEncoder(en_config) assigner = Attention_Assigner(as_cofig) model = cls(splayer, encoder, assigner, vocab_size) return model
def create_model(cls, sp_config, en_config, de_config): from blocks.sp_layers import SPLayer from blocks.encoders import TransformerEncoder from blocks.decoders import TransformerDecoder splayer = SPLayer(sp_config) encoder = TransformerEncoder(en_config) decoder = TransformerDecoder(de_config) model = cls(splayer, encoder, decoder) return model
def create_model(cls, sp_config, en_config, as_cofig, de_config): from blocks.sp_layers import SPLayer from blocks.encoders import TransformerEncoder from blocks.attention_assigner import Attention_Assigner from blocks.decoders import CIF_Decoder splayer = SPLayer(sp_config) encoder = TransformerEncoder(en_config) assigner = Attention_Assigner(as_cofig) decoder = CIF_Decoder(de_config) model = cls(splayer, encoder, assigner, decoder) return model