MCPcopy Index your code
hub / github.com/microsoft/TRELLIS / scale_module

Function scale_module

trellis/modules/utils.py:44–50  ·  view source on GitHub ↗

Scale the parameters of a module and return it.

(module, scale)

Source from the content-addressed store, hash-verified

42
43
44def scale_module(module, scale):
45 """
46 Scale the parameters of a module and return it.
47 """
48 for p in module.parameters():
49 p.detach().mul_(scale)
50 return module
51
52
53def modulate(x, shift, scale):

Callers

nothing calls this directly

Calls 1

detachMethod · 0.80

Tested by

no test coverage detected