Closed solitarysandman closed 5 years ago
Hi @solitarysandman how did you resolve this issue?
Well, the tensors were of the shape C, H, W instead of H, W, C. I just switched axis to fix this.
Hi @solitarysandman thank you so much for a quick response. But it seems to happen to me under both orders C,H,W and H,W,C. Any ideas?
Is there something I can do in pre-processing?
Can you print the shape of both im and pcm? They probably have a shape mismatch, which you'll need to address in a data preprocessing step (within cp_dataset)
So unless I'm crazy they're both the same?
The ones without description are _im_s
This is a different error. Looks like when you're concatenating shape, im_h, pose_map, they can't be stacked because of shape mismatch?
Can you try something like this before you define agnostic?
print(shape.shape, im_h.shape, pose_map.shape)
Hi @solitarysandman — sorry just got back from lunch. Ignore the previous message.
I think it is fixable, but the first error is if I remove the reshape command to be [3, 256, 192]
, the second is when I include it. I can reshape the other three but it seems to me that it was intended to be without the reshape from the start.
EDIT:
I was able to get a yet a different error by calling:
im_h = im_h.permute(2,0,1)
right before the cat
RuntimeError: The size of tensor a (270) must match the size of tensor b (3) at non-singleton dimension 2
Hi,
I am getting a tensor dimension error while running test.py as below:
python test.py --name gmm_traintest_new --stage GMM --workers 4 --datamode test --data_list test_pairs.txt --checkpoint checkpoints/gmm_train_new/gmm_final.pth
The error seems to arise from _cpdataset.py module in line 91. Somehow the size/shape of the image read is (3, 360, 270) where the image is of 360x270 pix. This throws the following error:![image](https://user-images.githubusercontent.com/31076890/50218635-97f52c00-03b2-11e9-9588-70cb8d785c71.png)
I've fixed this issue by using permute on the object im in _cpdataset.py after the image has been read and transformed. Although it fixes the error shown in the screengrab above, I still have some issues with the implementation. Seems like the input size of image MUST be 256x192?