MCPcopy Create free account
hub / github.com/MotrixLab/MotionDiffuse / init_weight

Function init_weight

text2motion/datasets/evaluator_models.py:27–32  ·  view source on GitHub ↗
(m)

Source from the content-addressed store, hash-verified

25
26
27def init_weight(m):
28 if isinstance(m, nn.Conv1d) or isinstance(m, nn.Linear) or isinstance(m, nn.ConvTranspose1d):
29 nn.init.xavier_normal_(m.weight)
30 # m.bias.data.fill_(0.01)
31 if m.bias is not None:
32 nn.init.constant_(m.bias, 0)
33
34
35def reparameterize(mu, logvar):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected