Skip to content

Commit b30377e

Browse files
committed
train: Remove saving last epoch weights
1 parent c9e2c71 commit b30377e

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

train.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@
7171
writer.add_scalar('lr', optimizer.param_groups[0]['lr'], epoch)
7272
scheduler.step(val_loss)
7373

74-
# 가장 마지막 epoch의 모델을 저장
75-
os.makedirs('weights', exist_ok=True)
76-
torch.save(model.state_dict(), os.path.join('weights', '{}_last.pth'.format(config['model'])))
77-
7874
# Best mIoU를 가진 모델을 저장
7975
if miou > prev_miou:
8076
torch.save(model.state_dict(), os.path.join('weights', '{}_best.pth'.format(config['model'])))

0 commit comments

Comments
 (0)