SpineNet-Pytorch icon indicating copy to clipboard operation
SpineNet-Pytorch copied to clipboard

behaviour different in train and test

Open lucasjinreal opened this issue 5 years ago • 3 comments

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

lucasjinreal avatar Sep 14 '20 09:09 lucasjinreal

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

yan-roo avatar Sep 16 '20 17:09 yan-roo

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

lucasjinreal avatar Sep 17 '20 04:09 lucasjinreal

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

yan-roo avatar Sep 18 '20 14:09 yan-roo