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

Method __init__

models/Syncnet.py:173–199  ·  view source on GitHub ↗
(self, in_channel, out_dim)

Source from the content-addressed store, hash-verified

171 """
172
173 def __init__(self, in_channel, out_dim):
174 super(FaceEncoder, self).__init__()
175 self.in_channel = in_channel
176 self.out_dim = out_dim
177 self.face_conv = nn.Sequential(
178 SameBlock2d(in_channel, 64, kernel_size=7, padding=3),
179 # # 64 → 32
180 ResBlock2d(64, 64, kernel_size=3, padding=1),
181 DownBlock2d(64, 64, 3, 1),
182 SameBlock2d(64, 128),
183 # 32 → 16
184 ResBlock2d(128, 128, kernel_size=3, padding=1),
185 DownBlock2d(128, 128, 3, 1),
186 SameBlock2d(128, 128),
187 # 16 → 8
188 ResBlock2d(128, 128, kernel_size=3, padding=1),
189 DownBlock2d(128, 128, 3, 1),
190 SameBlock2d(128, 128),
191 # 8 → 4
192 ResBlock2d(128, 128, kernel_size=3, padding=1),
193 DownBlock2d(128, 128, 3, 1),
194 SameBlock2d(128, 128),
195 # 4 → 2
196 ResBlock2d(128, 128, kernel_size=3, padding=1),
197 DownBlock2d(128, 128, 3, 1),
198 SameBlock2d(128, out_dim, kernel_size=1, padding=0),
199 )
200
201 def forward(self, x):
202 ## 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