pytorch的一些细节记录

文章目录

    • Dilation of Conv

Dilation of Conv

关于pytorch中卷积的dilation参数,文档 中定义如下:

torch.nn.Conv2d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros')

dilation controls the spacing between the kernel points; also known as the à trous algorithm. It is harder to describe, but this link has a nice visualization of what dilation does.

带孔卷积本身的原理比较简单,就是在原先的卷积窗口中插入空隙,比如带一个孔的话,就是隔一个像素采一个样,3x3的带1孔卷积的感受野实际为5x5;带两个孔的话,就是隔两个像素采一个样,3x3的带2孔卷积的感受野实际为9x9;

但pytorch中dilat

你可能感兴趣的:(计算机视觉)