chrisdxie / uois

MIT License
145 stars 44 forks source link

RuntimeError: Sizes of tensors must match except in dimension 2. Got 53 and 52 #15

Closed maisylam99 closed 1 year ago

maisylam99 commented 2 years ago

Hello!

I am trying to run the model on my own images which have a dimension of 428x760. It seems that when images are not of the original sample image size (480x640) there is an issue with tensor sizes. I have a feeling this might be an issue with upsampling or encoding/decoding in the network. Any suggestions how I can work around this or correct in the code?

Thanks!

TensorIssue_1 TensorIssue_2

chrisdxie commented 2 years ago

Hi @maisylam99, I would suggest re-sizing your image to something that is a power of 2, that way the downsampling/upsampling agrees.