Skip to content

Commit 65da037

Browse files
author
tsuba-neko
committed
add checkpoint
1 parent a5dae0f commit 65da037

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

train.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import random
2222
import sys
2323
import time
24+
from pprint import pprint
2425
from copy import deepcopy
2526
from datetime import datetime
2627
from pathlib import Path
@@ -385,6 +386,9 @@ def train(hyp, opt, device, callbacks): # hyp is path/to/hyp.yaml or hyp dictio
385386
torch.save(ckpt, best)
386387
if opt.save_period > 0 and epoch % opt.save_period == 0:
387388
LOGGER.info(f'Saving checkpoint at {epoch} epochs')
389+
pprint(ckpt)
390+
pprint(opt.save_dir)
391+
pprint(opt)
388392
torch.save(ckpt, w / f'epoch{epoch}.pt')
389393
del ckpt
390394
callbacks.run('on_model_save', last, epoch, final_epoch, best_fitness, fi)

0 commit comments

Comments
 (0)