You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, Suraj,
I am trying to use your T5FineTune class to study the fine tune skill.
But, unfortunately, when I tried to run the program on my env, I got this error:
in training_epoch_end
avg_train_loss = torch.stack([x["loss"] for x in outputs]).mean()
RuntimeError: stack expects a non-empty TensorList
I tried to track the cause and found that the "training_step" never be called.
I think it may relate with the "ImdbDataSet" for the train_dataloadder, but I debuged it and it seems all right.
I just begin to contact the DeepLearning, so maybe there is something is obvious but I really don't know.
Do you have any idea about what may cause it?
Thank you and looking forward your any feedback.
Best Regards
The text was updated successfully, but these errors were encountered:
Hi! I had the same problem and I figured out that it was a package version problem. In order to make this notebook work properly, you need to use this versions:
Thank @MarcosFP97 for the answer, I got the same issue and the loss is 'nan' during training. It can be solved by changing the package into the right version.
And also, perhaps the problem may be caused by the self-defined optimizer_step function. Another solution can be adding closure=optimizer_closure in optimizer.step() in the function optimizer_step(). This may work because in the self-defined optimizer_step() function, we need a closure function to return the last-training-backward-result to the ProgressBar in tqdm_dict.
In this way, my problem got solved without changing the package version. For example, add closure=optimizer_closure in the function:
Hi, Suraj,
I am trying to use your T5FineTune class to study the fine tune skill.
But, unfortunately, when I tried to run the program on my env, I got this error:
in training_epoch_end
avg_train_loss = torch.stack([x["loss"] for x in outputs]).mean()
RuntimeError: stack expects a non-empty TensorList
I tried to track the cause and found that the "training_step" never be called.
I think it may relate with the "ImdbDataSet" for the train_dataloadder, but I debuged it and it seems all right.
I just begin to contact the DeepLearning, so maybe there is something is obvious but I really don't know.
Do you have any idea about what may cause it?
Thank you and looking forward your any feedback.
Best Regards
The text was updated successfully, but these errors were encountered: