Pytorch_nn.Conv2d

Conv2d

torch.nn.Conv2d(in_channels, out_channels, kernel_size, stride=1, 
    padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros')
  • in_channels 输入数据通道数
  • out_channels 输出数据通道数
  • kennel_size 卷积核大小,int或tuple
  • stride 步长
  • padding 每个维度零填充的数量
  • dilation 内核点之间的距离,也称à trous algorithm
  • groups 控制inputs与outputs间的连接
  • groups=1,所有输入都卷积到输出
  • groups=2,并排设置两个conv层,每个层查看一半的输入通道,并生成一半的输出通道,然后将两者连接起来
  • groups=in_channels,每个输入通道都有它自己的filter,size为[out_channels/in_channels]
Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy