MCPcopy Create free account
hub / github.com/MeiGen-AI/MultiTalk / forward

Method forward

wan/modules/multitalk_model.py:87–92  ·  view source on GitHub ↗

r""" Args: x(Tensor): Shape [B, L, C]

(self, x)

Source from the content-addressed store, hash-verified

85 self.weight = nn.Parameter(torch.ones(dim))
86
87 def forward(self, x):
88 r"""
89 Args:
90 x(Tensor): Shape [B, L, C]
91 """
92 return self._norm(x.float()).type_as(x) * self.weight
93
94 def _norm(self, x):
95 return x * torch.rsqrt(x.pow(2).mean(dim=-1, keepdim=True) + self.eps)

Callers

nothing calls this directly

Calls 1

_normMethod · 0.95

Tested by

no test coverage detected