When I run the train.py in visualstorytelling, errors happens as list, do you have the solution?:
Traceback (most recent call last):
File "train.py", line 109, in <module>
main()
File "train.py", line 105, in main
train_model(opt, bart, dataset, test_dataset, 10)
File "train.py", line 42, in train_model
bart._model.train()
File "/home/caidesheng/miniconda3/envs/teran/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1277, in train
module.train(mode)
File "/home/caidesheng/miniconda3/envs/teran/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1277, in train
module.train(mode)
File "/home/caidesheng/miniconda3/envs/teran/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1277, in train
module.train(mode)
File "/home/caidesheng/.cache/torch/hub/pytorch_fairseq_master/fairseq/models/fairseq_model.py", line 212, in train
raise RuntimeError("cannot train after make_generation_fast")
RuntimeError: cannot train after make_generation_fast
it seems due to the code in fairseq_model.py of fairseq:
apply_make_generation_fast_(self, "")
def train(mode=True):
if mode:
raise RuntimeError("cannot train after make_generation_fast")
# this model should no longer be used for training
self.eval()
self.train = train
When I run the train.py in visualstorytelling, errors happens as list, do you have the solution?:
it seems due to the code in fairseq_model.py of fairseq: