VITA-Group / FasterSeg

[ICLR 2020] "FasterSeg: Searching for Faster Real-time Semantic Segmentation" by Wuyang Chen, Xinyu Gong, Xianming Liu, Qian Zhang, Yuan Li, Zhangyang Wang
MIT License
526 stars 107 forks source link

invalid argument 0: Sizes of tensors must match except in dimension 1. Got 19 and 20 in dimension 2 #34

Closed mx1mx2 closed 4 years ago

mx1mx2 commented 4 years ago

to change myself datasets will happen to this error.

chenwydj commented 4 years ago

@mx1mx2!

Thank you for your interest in our work!

One possible reason is that, the height or width of your image is not divisible by 64.

This is because, as we leveraged the pooled convolution in our architecture, feature maps will be downsampled and upsampled in this operator. If the height or width of the input image is not divisible by 32, the features with different resolutions cannot be matched on their sizes can thus cannot be merged by the segmentation head.

You could try to slightly resize your input image to be divisible by 32, which should not affect the performance much.