MCPcopy Create free account
hub / github.com/deepbrainai-research/float / framewise_modulate

Method framewise_modulate

models/float/FMT.py:185–186  ·  view source on GitHub ↗
(self, x, shift, scale)

Source from the content-addressed store, hash-verified

183 self.linear = nn.Linear(hidden_size, dim_w, bias=True)
184
185 def framewise_modulate(self, x, shift, scale) -> torch.Tensor:
186 return x * (1 + scale) + shift
187
188 def forward(self, x: torch.Tensor, c: torch.Tensor) -> torch.Tensor:
189 shift, scale = self.adaLN_modulation(c).chunk(2, dim=-1)

Callers 1

forwardMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected