Tramac / awesome-semantic-segmentation-pytorch

Semantic Segmentation on PyTorch (include FCN, PSPNet, Deeplabv3, Deeplabv3+, DANet, DenseASPP, BiSeNet, EncNet, DUNet, ICNet, ENet, OCNet, CCNet, PSANet, CGNet, ESPNet, LEDNet, DFANet)
Apache License 2.0
2.85k stars 582 forks source link

RuntimeError: The size of tensor a (120) must match the size of tensor b(128) at non-singleton dimension 3 #112

Open lonelylingoes opened 4 years ago

lonelylingoes commented 4 years ago

Hi, when I train the model dfanet, it comes the error, at the core/models/dfanet.py line 77: fusion = fusion + stage1_fca_decoder + stage2_fca_decoder + stage3_fca_decoder RuntimeError: The size of tensor a (120) must match the size of tensor b(128) at non-singleton dimension 3. Is there something wrong?

ICMoon527 commented 4 years ago

Maybe you can have a try to modify the parameter 'crop-size' to 512. Or you can modify the size of input tensors yourself.

Eric-wq-ux commented 1 year ago

RuntimeError: The size of tensor a (1552) must match the size of tensor b(1548) at non-singleton dimension 1