From 8bbae5ff5fab18626014c64e5eed1daa0c75207d Mon Sep 17 00:00:00 2001 From: SuperYY <45654909+wkmyws@users.noreply.github.com> Date: Tue, 12 Sep 2023 19:15:27 +0800 Subject: [PATCH] fix epoch loss --- examples/pytorch/mvgrl/graph/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/pytorch/mvgrl/graph/main.py b/examples/pytorch/mvgrl/graph/main.py index bebadf319928..38f5aaf8f7b1 100644 --- a/examples/pytorch/mvgrl/graph/main.py +++ b/examples/pytorch/mvgrl/graph/main.py @@ -130,8 +130,8 @@ def collate(samples): print("Epoch {}, Loss {:.4f}".format(epoch, loss_all)) - if loss < best: - best = loss + if loss_all < best: + best = loss_all best_t = epoch cnt_wait = 0 th.save(model.state_dict(), f"{args.dataname}.pkl")