MCPcopy Create free account
hub / github.com/Elsaam2y/DINet_optimized / SameBlock2d

Class SameBlock2d

models/Syncnet.py:146–165  ·  view source on GitHub ↗

basic block (no BN)

Source from the content-addressed store, hash-verified

144
145
146class SameBlock2d(nn.Module):
147 """
148 basic block (no BN)
149 """
150
151 def __init__(self, in_features, out_features, groups=1, kernel_size=3, padding=1):
152 super(SameBlock2d, self).__init__()
153 self.conv = nn.Conv2d(
154 in_channels=in_features,
155 out_channels=out_features,
156 kernel_size=kernel_size,
157 padding=padding,
158 groups=groups,
159 )
160 self.relu = nn.ReLU()
161
162 def forward(self, x):
163 out = self.conv(x)
164 out = self.relu(out)
165 return out
166
167
168class FaceEncoder(nn.Module):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected