junyanz / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch
Other
22.8k stars 6.29k forks source link

Help with Rectangular Images #1518

Closed taggyhan closed 1 year ago

taggyhan commented 1 year ago

I have rectangular images ( 350 x 700 ) that i am trying to train.

Understand from previous posts that i can include --preprocess crop to train it as such and include --preprocess none in my test set however when i do this i get this issue RuntimeError: Sizes of tensors must match except in dimension 1 when i run test.py.

I'm thinking this may be because (1) my image isn't in powers of 2 (2) i didn't use the load_size/ crop_size function

what do you guys think? any input would be appreciated I'm quite exasperated with myself haha

taggyhan commented 1 year ago

HAVE found out why: for those newbies like me, its because my test dataset wasn't divisive by 128/256