volo
volo copied to clipboard
RuntimeError: The size of tensor a (28) must match the size of tensor b (14) at non-singleton dimension 2
When use the pre-trained model VOLO-D4-448, the error as flow:
Traceback (most recent call last):
File "F:/volo-main/main1_all_complete.py", line 416, in
Hi, did you fix it? I meet same problem.
class VOLO(nn.Module): def init(self, layers, img_size=640, in_chans=3, patch_size=8, stem_hidden_dim=64, embed_dims=None, num_heads=None, downsamples=None, outlook_attention=None, mlp_ratios=None, qkv_bias=False, qk_scale=None, drop_rate=0., attn_drop_rate=0., drop_path_rate=0., norm_layer=nn.LayerNorm, post_layers=None, return_mean=False, return_dense=True, mix_token=True, pooling_scale=2, out_kernel=3, out_stride=2, out_padding=1):
image_size大小需要修改成你自己定义的!