Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ loguru
pyyaml
tqdm
numpy
pillow
pillow
torch
torchvision
4 changes: 2 additions & 2 deletions utils/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ 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])
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']
Expand Down