def train_dac_model(self, model_params): dac = DAC() smoother_model = dac.build_model(hidden_sizes=[64, 64], seq_len=50, no_words=40000, emb_layer=self.embedding_layer, lr=0.01) generator = Generator(sequences=self.sequences, batch_size=SMOOTH_BS, max_words=MAX_NUM_WORDS, max_len=MAX_LEN, split=SMOOTH_SPLIT) smoother_model = dac.train(generator, full_model=smoother_model, model_params=model_params, bs=SMOOTH_BS, split=SMOOTH_SPLIT, pretrain_epochs=4, epochs=SMOOTH_EPOCHS)