williamSYSU / TextGAN-PyTorch

TextGAN is a PyTorch framework for Generative Adversarial Networks (GANs) based text generation models.
MIT License
892 stars 205 forks source link

run run_relgan.py error #46

Closed shenmadouyaowen closed 3 years ago

shenmadouyaowen commented 3 years ago

Describe the bug

python3 run_relgan.py 1 1 No modifications were made to the base config.

Environment

AlexiaJM commented 3 years ago

@shenmadouyaowen

https://github.com/williamSYSU/TextGAN-PyTorch/blob/891635af6845edfee382de147faa4fc00c7e90eb/models/relational_rnn_general.py#L174

Solution is to change the line to: q = q * (self.key_size ** -0.5)

shenmadouyaowen commented 3 years ago

@shenmadouyaowen

https://github.com/williamSYSU/TextGAN-PyTorch/blob/891635af6845edfee382de147faa4fc00c7e90eb/models/relational_rnn_general.py#L174

解决方案是将行更改为:q = q *(self.key_size ** -0.5)

Thank you very much for your reply. It will be solved according to your revised method