Skip to content

Instantly share code, notes, and snippets.

@bilal2vec
Last active February 28, 2020 14:41
Show Gist options
  • Select an option

  • Save bilal2vec/bd6e4d9a706f207235e193f85fedb8ec to your computer and use it in GitHub Desktop.

Select an option

Save bilal2vec/bd6e4d9a706f207235e193f85fedb8ec to your computer and use it in GitHub Desktop.
class Encoder(nn.Module):
def __init__(self, in_ch, out_ch, r):
super(Encoder, self).__init__()
self.conv = nn.Conv2d(in_ch, out_ch, 3, padding=1)
self.se = SqueezeAndExcitation(out_ch, r)
def forward(self, x):
x = F.relu(self.conv(x), inplace=True)
x = self.se(x)
return x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment