You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why don't you use Depthwise separable convolution except _depthwise_conv?(_expand_conv, _se_reduce, _se_expand, _project_conv )
Does it matters for higher acc?
model.py
# Expansion phaseinp=self._block_args.input_filters# number of input channelsoup=self._block_args.input_filters*self._block_args.expand_ratio# number of output channelsifself._block_args.expand_ratio!=1:
self._expand_conv=Conv2d(in_channels=inp, out_channels=oup, kernel_size=1, bias=False)
self._bn0=nn.BatchNorm2d(num_features=oup, momentum=self._bn_mom, eps=self._bn_eps)
# Depthwise convolution phasek=self._block_args.kernel_sizes=self._block_args.strideself._depthwise_conv=Conv2d(
in_channels=oup, out_channels=oup, groups=oup, # groups makes it depthwisekernel_size=k, stride=s, bias=False)
self._bn1=nn.BatchNorm2d(num_features=oup, momentum=self._bn_mom, eps=self._bn_eps)
# Squeeze and Excitation layer, if desiredifself.has_se:
num_squeezed_channels=max(1, int(self._block_args.input_filters*self._block_args.se_ratio))
self._se_reduce=Conv2d(in_channels=oup, out_channels=num_squeezed_channels, kernel_size=1)
self._se_expand=Conv2d(in_channels=num_squeezed_channels, out_channels=oup, kernel_size=1)
# Output phasefinal_oup=self._block_args.output_filtersself._project_conv=Conv2d(in_channels=oup, out_channels=final_oup, kernel_size=1, bias=False)
self._bn2=nn.BatchNorm2d(num_features=final_oup, momentum=self._bn_mom, eps=self._bn_eps)
self._swish=MemoryEfficientSwish()
And Why don't you add Swish(x) at the End of MBConvBlock?
model.py
...
x=self._project_conv(x)
x=self._bn2(x)
...
Please let me know!
The text was updated successfully, but these errors were encountered:
Hi I'm really new to this model
Why don't you use Depthwise separable convolution except _depthwise_conv?(
_expand_conv
,_se_reduce
,_se_expand
,_project_conv
)Does it matters for higher acc?
model.py
And Why don't you add Swish(x) at the End of MBConvBlock?
model.py
Please let me know!
The text was updated successfully, but these errors were encountered: