updates
This commit is contained in:
parent
5d467c8ac4
commit
c2809622c1
4
train.py
4
train.py
|
@ -201,7 +201,9 @@ def train(
|
|||
# Calculate mAP
|
||||
opt.notest = opt.notest or (opt.nosave and epoch < 10) # skip testing first 10 epochs if opt.nosave
|
||||
if not opt.notest or epoch == epochs - 1: # always test final epoch
|
||||
results = test.test(cfg, data_cfg, batch_size=batch_size, img_size=img_size, model=model, conf_thres=0.1)
|
||||
with torch.no_grad():
|
||||
results = test.test(cfg, data_cfg, batch_size=batch_size, img_size=img_size, model=model,
|
||||
conf_thres=0.1)
|
||||
|
||||
# Write epoch results
|
||||
with open('results.txt', 'a') as file:
|
||||
|
|
Loading…
Reference in New Issue