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

Method __init__

models/old/Syncnet_BN.py:189–215  ·  view source on GitHub ↗
(self, in_channel, out_dim)

Source from the content-addressed store, hash-verified

187 """
188
189 def __init__(self, in_channel, out_dim):
190 super(FaceEncoder, self).__init__()
191 self.in_channel = in_channel
192 self.out_dim = out_dim
193 self.face_conv = nn.Sequential(
194 SameBlock2d(in_channel, 64, kernel_size=7, padding=3),
195 # # 64 → 32
196 ResBlock2d(64, 64, kernel_size=3, padding=1),
197 DownBlock2d(64, 64, 3, 1),
198 SameBlock2d(64, 128),
199 # 32 → 16
200 ResBlock2d(128, 128, kernel_size=3, padding=1),
201 DownBlock2d(128, 128, 3, 1),
202 SameBlock2d(128, 128),
203 # 16 → 8
204 ResBlock2d(128, 128, kernel_size=3, padding=1),
205 DownBlock2d(128, 128, 3, 1),
206 SameBlock2d(128, 128),
207 # 8 → 4
208 ResBlock2d(128, 128, kernel_size=3, padding=1),
209 DownBlock2d(128, 128, 3, 1),
210 SameBlock2d(128, 128),
211 # 4 → 2
212 ResBlock2d(128, 128, kernel_size=3, padding=1),
213 DownBlock2d(128, 128, 3, 1),
214 SameBlock2d(128, out_dim, kernel_size=1, padding=0),
215 )
216
217 def forward(self, x):
218 ## b x c x h x w

Callers

nothing calls this directly

Calls 4

SameBlock2dClass · 0.70
ResBlock2dClass · 0.70
DownBlock2dClass · 0.70
__init__Method · 0.45

Tested by

no test coverage detected