sangyun884 / HR-VITON

Official PyTorch implementation for the paper High-Resolution Virtual Try-On with Misalignment and Occlusion-Handled Conditions (ECCV 2022).
825 stars 171 forks source link

Resume training from a checkpoint #67

Open itouchzh opened 1 year ago

itouchzh commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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"