lucifer443 / SpineNet-Pytorch

This project is a kind of implementation of SpineNet(CVPR 2020) using mmdetection.
Apache License 2.0
96 stars 11 forks source link

behaviour different in train and test #8

Open lucasjinreal opened 4 years ago

lucasjinreal commented 4 years ago

when train the model size is correct, while inference got error:

/spinenet.py", line 157, in forward
    target_feat = parent0_feat + parent1_feat
RuntimeError: The size of tensor a (14) must match the size of tensor b (16) at non-singleton dimension 2
yan-roo commented 4 years ago

Which config version are you using when inference? The config file "spinenet_49_B" got error when your size_divisor = 64 (Line 81) Try to set size_divisor from 64 to 128 https://github.com/yan-roo/SpineNet-Pytorch/blob/master/configs/spinenet/spinenet_49_B_8gpu_640.py#L81

lucasjinreal commented 4 years ago

@yan-roo Can i set input w h which divisor is 32? which source code I might want to change?

yan-roo commented 4 years ago

@jinfagang I tried to set different test input resolution. However, when the divisor lower than 128 the RuntimeError will occur as you mentioned above.