ZhenYangIACAS / NMT_GAN

generative adversarial nets for neural machine translation
Apache License 2.0
119 stars 37 forks source link

GAN training is too slow. #29

Open adrianchiyuk opened 5 years ago

adrianchiyuk commented 5 years ago

After pretraining the generator and discriminator, the gan_training is too slow even for 1K training data.

gan_train.py line 102

where the get_reward takes the most time.

The step is rewards = generator.get_reward(x=x, x_to_maxlen=x_to_maxlen, y_sample=y_sample_dealed, y_sample_mask=y_sample_mask, rollnum=config.rollnum, disc=discriminator, max_len=config.discriminator.dis_max_len, bias_num=config.bias_num, data_util=du)

May I ask why this happens ?

Thank you in advance.