updates
This commit is contained in:
parent
a701374014
commit
be934ba5a5
9
train.py
9
train.py
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue