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

Method __init__

wan/models/pdf.py:412–436  ·  view source on GitHub ↗
(self, pose_dim=6, eye_dim=6)

Source from the content-addressed store, hash-verified

410
411class FanEncoder(ModelMixin, ConfigMixin, FromOriginalModelMixin):
412 def __init__(self, pose_dim=6, eye_dim=6):
413 super(FanEncoder, self).__init__()
414 self.model = FAN_use()
415
416 self.to_mouth = nn.Sequential(
417 nn.Linear(512, 512), nn.ReLU(), nn.BatchNorm1d(512), nn.Linear(512, 512)
418 )
419 self.mouth_embed = nn.Sequential(
420 nn.ReLU(), nn.Linear(512, 512 - pose_dim - eye_dim)
421 )
422
423 self.to_headpose = nn.Sequential(
424 nn.Linear(512, 512), nn.ReLU(), nn.BatchNorm1d(512), nn.Linear(512, 512)
425 )
426 self.headpose_embed = nn.Sequential(nn.ReLU(), nn.Linear(512, pose_dim))
427
428 self.to_eye = nn.Sequential(
429 nn.Linear(512, 512), nn.ReLU(), nn.BatchNorm1d(512), nn.Linear(512, 512)
430 )
431 self.eye_embed = nn.Sequential(nn.ReLU(), nn.Linear(512, eye_dim))
432
433 self.to_emo = nn.Sequential(
434 nn.Linear(512, 512), nn.ReLU(), nn.BatchNorm1d(512), nn.Linear(512, 512)
435 )
436 self.emo_embed = nn.Sequential(nn.ReLU(), nn.Linear(512, 30))
437
438 def forward_feature(self, x):
439 net = self.model(x)

Callers

nothing calls this directly

Calls 2

FAN_useClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected