This commit is contained in:
Glenn Jocher 2019-04-17 16:11:26 +02:00
parent 0b8a28e3dd
commit a95e47533a
1 changed files with 3 additions and 2 deletions

View File

@ -69,6 +69,7 @@ def test(
inf_out, train_out = model(imgs) # inference and training outputs inf_out, train_out = model(imgs) # inference and training outputs
# Compute loss # Compute loss
if hasattr(model, 'hyp'): # if model has loss hyperparameters
loss_i, _ = compute_loss(train_out, targets, model) loss_i, _ = compute_loss(train_out, targets, model)
loss += loss_i.item() loss += loss_i.item()