# 1x1 Convolution with padding = 0, stride = 1, dilation = 2

**URL:** <https://discuss.pytorch.org/t/1x1-convolution-with-padding-0-stride-1-dilation-2/99415>\
**Category:** Uncategorized\
**Created:** [October 15, 2020, 2:33am UTC](https://discuss.pytorch.org/t/1x1-convolution-with-padding-0-stride-1-dilation-2/99415 "2020-10-15T02:33:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JamesDickens](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/jamesdickens/32/45317_2.png) [@JamesDickens](https://discuss.pytorch.org/u/JamesDickens)\
**Post date:** [October 15, 2020, 2:33am UTC](https://discuss.pytorch.org/t/1x1-convolution-with-padding-0-stride-1-dilation-2/99415/1 "2020-10-15T02:33:00Z")

</div>

I am trying to understand what is happening in the scenario where I have a 2d  
convolutional layer with the following parameters:

2d\_conv = nn.Conv2d(3, 3, kernel\_size=1, stride=1,  
padding=0, bias=False, dilation=2)

Is this just the same as a regular 1x1 2-d convolution, since I’m not sure what effect  
the dilation would have.

I am asking since in the paper describing the a-trous algorithm modification of a resnet-101 backbone in R-FCN the authors write:

> All layers before and on the conv4 stage [9] (stride=16) are unchanged; the stride=2 operations in the first conv5 block is modified to have stride=1, and all convolutional filters on the conv5 stage are modified by the “hole algorithm” [15, 2] (“Algorithme à trous”) to compensate for the reduced stride

---

<div class="post-metadata">

**Author:** ![phan\_phan](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/phan_phan/32/51960_2.png) [@phan\_phan](https://discuss.pytorch.org/u/phan_phan)\
**Post date:** [October 15, 2020, 8:49am UTC](https://discuss.pytorch.org/t/1x1-convolution-with-padding-0-stride-1-dilation-2/99415/2 "2020-10-15T08:49:21Z")

</div>

When `kernel_size=1`, dilation has no effect.  
See [this page](https://github.com/vdumoulin/conv_arithmetic/blob/master/README.md) for a visualization of dilation : for only 1 pixel as input, should not change a thing.
