depth wisepoint wise
文章目录
- 1. Description
- 2. code
1. Description
point wise
1. function: for the separated pixel without pixel confusion
2. kernel size : 3x3 ,star matrix [[0,0,0],[0,1,0],[0,0,0]] depth wise
1. fuction: for the separated channel without channel confusion
2. kernel size: any kernel matrix
3. Pytorch : conv2d for the groups=in_channels
patch embedding
1. function : for the feature embedding without overlap for conv2d;
c * hw --> cc/p*c/p
2. kernel: conv2d(out_channels,in_channels,kernel_size=p,stride=p)
3. advantage: for reducing the parameters,can use the patch as the feature point
groups
1. function : for the channel separated
2. if conv2D=(4,2,3,3weight =[4,2,3,3] for the groups=1;
if conv2d=(4,2,3,3,groups=2)==> weight=[4,1,3,3] for the groups=2
dilation
1. function : increase the sample scope
2. how to achieve the dilation with matrix multiply
stride
1. function: move with stride gap
padding
1. function: filling the matrix with zero elements
2. code
- original_conv2d = nn.conv2d(out_channel=4,in_channel=2,kernel_size=(3,3),groups=1)
weight = [4,2,3,3] - group1_conv2d = nn.conv2d(out_channel=4,in_channel=2,kernel_size=(3,3),groups=2)
weight = [4,1,3,3] - group2_conv2d = nn.conv2d(out_channel=4,in_channel=2,kernel_size=(3,3),groups=2)
weight = [4,1,3,3]