Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resume training from a checkpoint #67

Open
itouchzh opened this issue Apr 21, 2023 · 2 comments
Open

Resume training from a checkpoint #67

itouchzh opened this issue Apr 21, 2023 · 2 comments

Comments

@itouchzh
Copy link

Hi.
How can I resume training from the breakpoint without starting over when the training is interrupted unexpectedly?
Is modifying the load_step option in the code and loading the desired checkpoint a correct approach?
Like this:
parser.add_argument("--load_step", type=int, default=70000) parser.add_argument('--gen_checkpoint', type=str, default='./checkpoints/gen_step_070000.pth', help='gen checkpoint') parser.add_argument('--dis_checkpoint', type=str, default='./checkpoints/dis_step_070000.pth', help='dis checkpoint')
Is there anything else that needs to be done besides this?
Thanks.

@24thTinyGiant
Copy link

@itouchzh can you you tell what steps you carried out to start training and did you keep the dataset as it is for training or made some changes. Please Help

@24thTinyGiant
Copy link

File "/content/TryYours-Virtual-Try-On/HR-VITON-main/train_condition.py", line 503, in
main()
File "/content/TryYours-Virtual-Try-On/HR-VITON-main/train_condition.py", line 494, in main
train(opt, train_loader, val_loader, test_loader, board, tocg, D)
File "/content/TryYours-Virtual-Try-On/HR-VITON-main/train_condition.py", line 162, in train
flow_list, fake_segmap, warped_cloth_paired, warped_clothmask_paired = tocg(opt,input1=input2, input2=input2)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/content/TryYours-Virtual-Try-On/HR-VITON-main/networks.py", line 107, in forward
E1_list.append(self.ClothEncoderi)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/content/TryYours-Virtual-Try-On/HR-VITON-main/networks.py", line 197, in forward
residual = self.scale(x)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/conv.py", line 463, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/conv.py", line 459, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Given groups=1, weight of size [96, 4, 3, 3], expected input[8, 16, 256, 192] to have 4 channels, but got 16 channels instead "I'm getting this error"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants