This commit is contained in:
Glenn Jocher 2019-02-09 19:26:53 +01:00
parent a701374014
commit be934ba5a5
1 changed files with 1 additions and 8 deletions

View File

@ -196,13 +196,7 @@ def train(
os.system('cp ' + latest_weights_file + ' ' + os.path.join(weights, 'backup{}.pt'.format(epoch))) os.system('cp ' + latest_weights_file + ' ' + os.path.join(weights, 'backup{}.pt'.format(epoch)))
# Calculate mAP # Calculate mAP
mAP, R, P = test.test( mAP, R, P = test.test(cfg, data_cfg, weights=latest_weights_file, batch_size=batch_size, img_size=img_size)
cfg,
data_cfg,
latest_weights_file,
batch_size=batch_size,
img_size=img_size,
)
# Write epoch results # Write epoch results
with open('results.txt', 'a') as file: with open('results.txt', 'a') as file:
@ -228,7 +222,6 @@ if __name__ == '__main__':
init_seeds() init_seeds()
torch.cuda.empty_cache()
train( train(
opt.cfg, opt.cfg,
opt.data_cfg, opt.data_cfg,