MCPcopy Create free account
hub / github.com/Vchitect/SEINE / scale_module

Function scale_module

models/utils.py:106–112  ·  view source on GitHub ↗

Scale the parameters of a module and return it.

(module, scale)

Source from the content-addressed store, hash-verified

104
105
106def scale_module(module, scale):
107 """
108 Scale the parameters of a module and return it.
109 """
110 for p in module.parameters():
111 p.detach().mul_(scale)
112 return module
113
114
115def mean_flat(tensor):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected