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

Custom dataset #42

Open mnavaidd opened 4 years ago

mnavaidd commented 4 years ago

Whenever I attached my own custom dataset, this error is coming

Starting Generator MLE Training...
Traceback (most recent call last):
  File "main.py", line 169, in <module>
    inst._run()
  File "/content/drive/My Drive/Colab Notebooks/2/TextGAN-PyTorch/instructor/real_data/seqgan_instructor.py", line 41, in _run
    self.pretrain_generator(cfg.MLE_train_epoch)
  File "/content/drive/My Drive/Colab Notebooks/2/TextGAN-PyTorch/instructor/real_data/seqgan_instructor.py", line 85, in pretrain_generator
    pre_loss = self.train_gen_epoch(self.gen, self.train_data.loader, self.mle_criterion, self.gen_opt)
  File "/content/drive/My Drive/Colab Notebooks/2/TextGAN-PyTorch/instructor/real_data/instructor.py", line 107, in train_gen_epoch
    return total_loss / len(data_loader)
ZeroDivisionError: division by zero