I am trying to train a Bart model downloaded from torch hub, but i got the following error when calling the train method on the model.
import torch
bart = torch.hub.load('pytorch/fairseq', 'bart.base')
model = bart.model
model.train()
I got the following error message
File "/home/david/.cache/torch/hub/pytorch_fairseq_main/fairseq/models/fairseq_model.py", line 220, in train
raise RuntimeError("cannot train after make_generation_fast")
RuntimeError: cannot train after make_generation_fast