MaxViT icon indicating copy to clipboard operation
MaxViT copied to clipboard

Regarding parameters

Open saarthak-kapse opened this issue 3 years ago • 0 comments

Hi Chrstoph, thanks for code skeleton for MaxViT paper.

I checked the number of parameters of your code and paper, and both seems to be difference. MaxViT tiny give 24M parameter in this github repo, whereas paper reports 31M. Can you please help me out?

Also I believe the main_path in MBConv block should be like :-

`

   self.main_path = nn.Sequential(

    norm_layer(in_channels),

nn.Conv2d(in_channels=in_channels, out_channels=out_channels, kernel_size=(1, 1)),   # not in original code

norm_layer(out_channels),

act_layer(),

     DepthwiseSeparableConv(in_chs=out_channels, out_chs=out_channels, stride=2 if downscale else 1,
                               act_layer=act_layer, norm_layer=norm_layer, drop_path_rate=drop_path),

      SqueezeExcite(in_chs=out_channels, rd_ratio=0.25),

      nn.Conv2d(in_channels=out_channels, out_channels=out_channels, kernel_size=(1, 1))
    )

`

Here you missed first conv2d of kernel 1x1 in your code.

Thanks, Saarthak

saarthak-kapse avatar May 18 '22 18:05 saarthak-kapse