weight_decay fix

This commit is contained in:
Glenn Jocher 2019-08-29 14:20:54 +02:00
parent 85a24dbc7e
commit 31d807e589
1 changed files with 1 additions and 1 deletions

View File

@ -259,7 +259,7 @@ def train():
# Compute loss # Compute loss
loss, loss_items = compute_loss(pred, targets, model) loss, loss_items = compute_loss(pred, targets, model)
if torch.isnan(loss): if torch.isnan(loss):
print('WARNING: nan loss detected, ending training') print('WARNING: nan loss detected, ending training', loss_items)
return results return results
# Scale loss by nominal batch_size of 64 # Scale loss by nominal batch_size of 64