From b6a593b197266e15ed1a08f845fcf97d70caaac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E6=9C=A8=E7=9A=84=E6=9C=A8=E5=A4=B4?= Date: Sat, 2 Apr 2022 14:32:28 +0800 Subject: [PATCH 1/4] fix requirements --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index a9dbe249..a11462d0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,4 +3,5 @@ loguru pyyaml tqdm numpy -pillow \ No newline at end of file +pillow +torch From f37db82ab7b607bfa3fc2dfc72d0ccdeea3dce8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E6=9C=A8=E7=9A=84=E6=9C=A8=E5=A4=B4?= Date: Sat, 2 Apr 2022 14:41:38 +0800 Subject: [PATCH 2/4] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index a11462d0..b8118459 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,4 @@ tqdm numpy pillow torch +torchvision From 1901f432b5a8d885aa1ff41b8910dffae6f95f3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E6=9C=A8=E7=9A=84=E6=9C=A8=E5=A4=B4?= Date: Tue, 5 Apr 2022 22:20:35 +0800 Subject: [PATCH 3/4] Update train.py --- utils/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/train.py b/utils/train.py index 67f6a2f8..b0cf3d7c 100644 --- a/utils/train.py +++ b/utils/train.py @@ -56,7 +56,7 @@ def __init__(self, project_name: str): newer_checkpoint = None for checkpoint in history_checkpoints: checkpoint_name = checkpoint.split(".")[0].split("_") - if int(checkpoint_name[3]) > history_step: + if int(checkpoint_name[-1]) > history_step: newer_checkpoint = checkpoint history_step = int(checkpoint_name[3]) param, self.state_dict, self.optimizer= Net.load_checkpoint( From 50a19e690318fe5e8ed3767abb5f73dc684cec5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=A8=E6=9C=A8=E7=9A=84=E6=9C=A8=E5=A4=B4?= Date: Tue, 5 Apr 2022 22:25:04 +0800 Subject: [PATCH 4/4] Update train.py --- utils/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/train.py b/utils/train.py index b0cf3d7c..e755771c 100644 --- a/utils/train.py +++ b/utils/train.py @@ -58,7 +58,7 @@ def __init__(self, project_name: str): checkpoint_name = checkpoint.split(".")[0].split("_") if int(checkpoint_name[-1]) > history_step: newer_checkpoint = checkpoint - history_step = int(checkpoint_name[3]) + history_step = int(checkpoint_name[-1]) param, self.state_dict, self.optimizer= Net.load_checkpoint( os.path.join(self.checkpoints_path, newer_checkpoint), self.device) self.epoch, self.step, self.lr = param['epoch'], param['step'], param['lr']