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
|
inf_out, train_out = model(imgs) # inference and training outputs
|
||||||
|
|
||||||
# Compute loss
|
# Compute loss
|
||||||
loss_i, _ = compute_loss(train_out, targets, model)
|
if hasattr(model, 'hyp'): # if model has loss hyperparameters
|
||||||
loss += loss_i.item()
|
loss_i, _ = compute_loss(train_out, targets, model)
|
||||||
|
loss += loss_i.item()
|
||||||
|
|
||||||
# Run NMS
|
# Run NMS
|
||||||
output = non_max_suppression(inf_out, conf_thres=conf_thres, nms_thres=nms_thres)
|
output = non_max_suppression(inf_out, conf_thres=conf_thres, nms_thres=nms_thres)
|
||||||
|
|
Loading…
Reference in New Issue