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

RuntimeError while Training on Custom Dataset #72

Open
Bowenwu1 opened this issue Jan 9, 2021 · 1 comment
Open

RuntimeError while Training on Custom Dataset #72

Bowenwu1 opened this issue Jan 9, 2021 · 1 comment

Comments

@Bowenwu1
Copy link

Bowenwu1 commented Jan 9, 2021

Hi! Thanks for your wonderful work!
For now, I'm trying to train impersonator on my data. But I got the error as ablow and have no idea to solve it. I think it may be some issue related to my data(may SMPL). Could you give me some advice to figure it out?
Looking forward to your reply! You will help a lot for my research.

File "train.py", line 140, in <module>                                                                                 [16/1919]
    Train()
  File "train.py", line 26, in __init__
    self._train()
  File "train.py", line 39, in _train
    self._train_epoch(i_epoch)
  File "train.py", line 68, in _train_epoch
    self._model.optimize_parameters(keep_data_for_visuals=do_visuals, trainable=trainable)
  File "/data0/wubowen/impersonator/models/impersonator_trainer.py", line 354, in optimize_parameters
    loss_G = self._optimize_G(fake_bg, fake_src_imgs, fake_tsf_imgs, fake_masks)
  File "/data0/wubowen/impersonator/models/impersonator_trainer.py", line 385, in _optimize_G
    fake_tsf_imgs, self._real_tsf, bbox1=self._head_bbox, bbox2=self._head_bbox)) * self._opt.lambda_face
  File "/data0/wubowen/miniconda3/envs/liquid/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in __call__
    result = self.forward(*input, **kwargs)
  File "/data0/wubowen/miniconda3/envs/liquid/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 152, in forwa$
d
    outputs = self.parallel_apply(replicas, inputs, kwargs)
  File "/data0/wubowen/miniconda3/envs/liquid/lib/python3.6/site-packages/torch/nn/parallel/data_parallel.py", line 162, in paral$el_apply
    return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
  File "/data0/wubowen/miniconda3/envs/liquid/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 85, in paral$
el_apply
    output.reraise()
  File "/data0/wubowen/miniconda3/envs/liquid/lib/python3.6/site-packages/torch/_utils.py", line 369, in reraise
    raise self.exc_type(msg)
RuntimeError: Caught RuntimeError in replica 3 on device 3.
Original Traceback (most recent call last):
  File "/data0/wubowen/miniconda3/envs/liquid/lib/python3.6/site-packages/torch/nn/parallel/parallel_apply.py", line 60, in _work$
r
    output = module(*input, **kwargs)
  File "/data0/wubowen/miniconda3/envs/liquid/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in __call__
    result = self.forward(*input, **kwargs)
  File "/data0/wubowen/impersonator/networks/networks.py", line 246, in forward
    head_imgs1 = self.crop_head_bbox(imgs1, bbox1)
  File "/data0/wubowen/impersonator/networks/networks.py", line 306, in crop_head_bbox
    head = F.interpolate(head, size=(self.height, self.width), mode='bilinear', align_corners=True)
  File "/data0/wubowen/miniconda3/envs/liquid/lib/python3.6/site-packages/torch/nn/functional.py", line 2503, in interpolate
    return torch._C._nn.upsample_bilinear2d(input, _output_size(2), align_corners)
RuntimeError: input and output sizes should be greater than 0, but got input (H: 0, W: 45) output (H: 112, W: 96)
@Bowenwu1
Copy link
Author

Bowenwu1 commented Jan 9, 2021

I extract SMPL data as you have shown in #28.

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

1 participant