Skip to content

Commit 82291a1

Browse files
committed
train: Fix saving best val loss weights
1 parent 90208b3 commit 82291a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
prev_miou = miou
7878

7979
# Best val_loss를 가진 모델을 저장
80-
if val_loss > prev_val_loss:
80+
if val_loss < prev_val_loss:
8181
torch.save(model.state_dict(), os.path.join('weights', '{}_val_best.pth'.format(config['model'])))
8282
prev_val_loss = val_loss
8383
writer.close()

0 commit comments

Comments
 (0)