geek-ai / Texygen

A text generation benchmarking platform
MIT License
863 stars 203 forks source link

Bugs in running RankGAN #48

Open cyk1337 opened 4 years ago

cyk1337 commented 4 years ago

When running python main.py -g rankgan, got IndexError:

Traceback (most recent call last):
  File "/home/xxx/Texygen/main.py", line 78, in parse_cmd
    gan.train_oracle()
  File "/home/xxx/Texygen/models/rankgan/Rankgan.py", line 121, in train_oracle
    self.evaluate()
  File "/home/chaiyekun/GAN.tf/Texygen/models/rankgan/Rankgan.py", line 93, in evaluate
    scores = super().evaluate()
  File "/home/xxx/Texygen/models/Gan.py", line 57, in evaluate
    score = metric.get_score()
  File "/home/xxx/Texygen/utils/metrics/DocEmbSim.py", line 32, in get_score
    self.get_gen_sim()
  File "/home/xxx/Texygen/utils/metrics/DocEmbSim.py", line 153, in get_gen_sim
    self.gen_sim = self.get_wordvec(self.generator_file)
  File "/home/xxx/Texygen/utils/metrics/DocEmbSim.py", line 142, in get_wordvec
    batch_size, num_skips, skip_window, data[index])
  File "/home/xxx/Texygen/utils/metrics/DocEmbSim.py", line 72, in generate_batch
    buffer.append(data[self.data_index])
IndexError: list index out of range