tengteng95 / Pose-Transfer

Code for the paper Progressive Pose Attention for Person Image Generation in CVPR19 (Oral).
MIT License
734 stars 160 forks source link

runtime erroe #83

Closed stdntlfe closed 4 years ago

stdntlfe commented 4 years ago
Total number of parameters: 41358019
-----------------------------------------------
model [TransferModel] was created
200
8670
False
 process 0/999999 img ..
/home/arvind/anaconda3/lib/python3.7/site-packages/torch/nn/functional.py:1332: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
  warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
Traceback (most recent call last):
  File "test.py", line 39, in <module>
    model.test()
  File "/home/arvind/dewwork/models/PATN.py", line 137, in test
    self.fake_p2 = self.netG(G_input)
  File "/home/arvind/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/arvind/dewwork/models/model_variants.py", line 167, in forward
    return self.model(input)
  File "/home/arvind/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/arvind/dewwork/models/model_variants.py", line 148, in forward
    x1, x2, _ = model(x1, x2)
  File "/home/arvind/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/arvind/dewwork/models/model_variants.py", line 63, in forward
    x1_out = x1_out * att
RuntimeError: The size of tensor a (64) must match the size of tensor b (44) at non-singleton dimension 3

please find out the error

jessemelpolio commented 4 years ago

I think the input condition image and the poses are not consistently aligned. It seems the width of the condition image/pose heat map is 256 while the width of the pose heat maps/condition image is 176. Please have a check.