igul222 / improved_wgan_training

Code for reproducing experiments in "Improved Training of Wasserstein GANs"
MIT License
2.35k stars 669 forks source link

gan_language.py has some reference errors #6

Closed tfy12fma closed 7 years ago

tfy12fma commented 7 years ago

Hi I wanted to try out your very promising language model but I get the following errors when trying to run gan_language.py

Traceback (most recent call last):
  File "gan_language.py", line 89, in <module>
    fake_inputs = Generator(BATCH_SIZE)
  File "gan_language.py", line 64, in Generator
    output = tf.reshape(output, [-1, SETTINGS['dim_g'], SEQ_LEN])
NameError: global name 'SETTINGS' is not defined

To solve this I simply used DIM instead of SETTINGS['dim_g'] but I'm not sure whether this is the right value. When I then try to run again I get the following error

Traceback (most recent call last):
  File "gan_language.py", line 130, in <module>
    true_char_ngram_lms = [data_tools.NgramLanguageModel(i+1, lines[10*BATCH_SIZE:], tokenize=False) for i in xrange(4)]
NameError: name 'data_tools' is not defined

I believe that data_tools should be replaced with language_helpers

igul222 commented 7 years ago

Thanks for catching these! Fixed now.