MCPcopy Create free account
hub / github.com/TencentARC/MotionCtrl / Scale

Class Scale

lvdm/modules/x_transformer.py:117–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115
116# classes
117class Scale(nn.Module):
118 def __init__(self, value, fn):
119 super().__init__()
120 self.value = value
121 self.fn = fn
122
123 def forward(self, x, **kwargs):
124 x, *rest = self.fn(x, **kwargs)
125 return (x * self.value, *rest)
126
127
128class Rezero(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected