MCPcopy Create free account
hub / github.com/Francis-Rings/FlashPortrait / forward

Method forward

wan/models/pdf.py:386–408  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

384 self.relu = nn.ReLU(True)
385
386 def forward(self, x):
387 x = F.relu(self.bn1(self.conv1(x)), True)
388 x = F.max_pool2d(self.conv2(x), 2)
389 x = self.conv3(x)
390 x = self.conv4(x)
391
392 previous = x
393
394 i = 0
395 hg = self._modules["m" + str(i)](previous)
396
397 ll = hg
398 ll = self._modules["top_m_" + str(i)](ll)
399
400 ll = self._modules["bn_end" + str(i)](self._modules["conv_last" + str(i)](ll))
401 tmp_out = self._modules["l" + str(i)](F.relu(ll))
402
403 net = self.relu(self.bn5(tmp_out))
404 net = self.conv6(net)
405 net = net.view(-1, net.shape[-2] * net.shape[-1])
406 net = self.relu(net)
407 net = self.fc(net)
408 return net
409
410
411class FanEncoder(ModelMixin, ConfigMixin, FromOriginalModelMixin):

Callers 2

det_landmarksFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected