minivision-ai / photo2cartoon

人像卡通化探索项目 (photo-to-cartoon translation project)
MIT License
3.94k stars 763 forks source link

Training on input size (386*386) given an error #73

Closed pradyumnjain closed 1 year ago

pradyumnjain commented 2 years ago

The training works fine for 128 and 256 input sizes but doesn't work when the input image is not in the power of 2. I received the following error when training with 386*386

RuntimeError: The size of tensor a (193) must match the size of tensor b (192) at non-singleton dimension 3

hao-qiang commented 2 years ago

Due to several down-sampling layers, the input size should be divisible by 2 many times. Please try 384*384.