MCPcopy Create free account
hub / github.com/ShanghaiTech-IMPACT/TeethDreamer / scale_module

Function scale_module

ldm/modules/diffusionmodules/util.py:183–189  ·  view source on GitHub ↗

Scale the parameters of a module and return it.

(module, scale)

Source from the content-addressed store, hash-verified

181
182
183def scale_module(module, scale):
184 """
185 Scale the parameters of a module and return it.
186 """
187 for p in module.parameters():
188 p.detach().mul_(scale)
189 return module
190
191
192def mean_flat(tensor):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected