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
When the training process finished the first epoch and saved the model, it threw out the error:
epoch 1 iter 8713: train loss 0.25403. lr 3.000169e-04: 100%|██████████| 8714/8714 [4:12:50<00:00, 1.74s/it]
Traceback (most recent call last):
File "try.py", line 105, in <module>
trainer.train()
File "/home/ec2-user/minGPT/mingpt/trainer.py", line 129, in train
best_loss = test_loss
UnboundLocalError: local variable 'test_loss' referenced before assignment
Environment: Python3 + pytorch 1.6
The text was updated successfully, but these errors were encountered:
test_dataset = train_dataset.split(0.2) # take last 20% for a test set
tconf.ckpt_path = "mycheck.ckpt"
trainer = Trainer(model, train_dataset, test_dataset, tconf)
When the training process finished the first epoch and saved the model, it threw out the error:
Environment: Python3 + pytorch 1.6
The text was updated successfully, but these errors were encountered: