Created
March 6, 2022 03:49
-
-
Save andreaschandra/b6553e03808bf888afe4a746a4c23c9d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def conv3x3( | |
in_planes: int, out_planes: int, stride: int = 1, groups: int = 1, dilation: int = 1 | |
) -> nn.Conv2d: | |
"""3x3 convolution with padding""" | |
return nn.Conv2d( | |
in_planes, | |
out_planes, | |
kernel_size=3, | |
stride=stride, | |
padding=dilation, | |
groups=groups, | |
bias=False, | |
dilation=dilation, | |
) | |
def conv1x1(in_planes: int, out_planes: int, stride: int = 1) -> nn.Conv2d: | |
"""1x1 convolution""" | |
return nn.Conv2d(in_planes, out_planes, kernel_size=1, stride=stride, bias=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment