updates
This commit is contained in:
parent
0b8a28e3dd
commit
a95e47533a
5
test.py
5
test.py
|
@ -69,8 +69,9 @@ def test(
|
|||
inf_out, train_out = model(imgs) # inference and training outputs
|
||||
|
||||
# Compute loss
|
||||
loss_i, _ = compute_loss(train_out, targets, model)
|
||||
loss += loss_i.item()
|
||||
if hasattr(model, 'hyp'): # if model has loss hyperparameters
|
||||
loss_i, _ = compute_loss(train_out, targets, model)
|
||||
loss += loss_i.item()
|
||||
|
||||
# Run NMS
|
||||
output = non_max_suppression(inf_out, conf_thres=conf_thres, nms_thres=nms_thres)
|
||||
|
|
Loading…
Reference in New Issue