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

Method forward

wan/modules/model.py:81–86  ·  view source on GitHub ↗

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

(self, x)

Source from the content-addressed store, hash-verified

79 self.weight = nn.Parameter(torch.ones(dim))
80
81 def forward(self, x):
82 r"""
83 Args:
84 x(Tensor): Shape [B, L, C]
85 """
86 return self._norm(x.float()).type_as(x) * self.weight
87
88 def _norm(self, x):
89 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