Created
November 9, 2020 11:23
-
-
Save seanbenhur/42244f837f485c093618cc0e6727beb0 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
class conv_block(nn.Module): | |
def __init__(self, in_channels, out_channels, **kwargs): | |
super(conv_block, self).__init__() | |
self.relu = nn.ReLU() | |
self.conv = nn.Conv2d(in_channels, out_channels, **kwargs) | |
self.batchnorm = nn.BatchNorm2d(out_channels) | |
def forward(self, x): | |
return self.relu(self.batchnorm(self.conv(x))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment