core.modules.scaling.compat#

Attributes#

Functions#

_load_scale_dict(scale_file)

Loads scale factors from either:

load_scales_compat(→ None)

Module Contents#

core.modules.scaling.compat.ScaleDict#
core.modules.scaling.compat._load_scale_dict(scale_file: str | ScaleDict | None)#

Loads scale factors from either: - a JSON file mapping scale factor names to scale values - a python dictionary pickled object (loaded using torch.load) mapping scale factor names to scale values - a dictionary mapping scale factor names to scale values

core.modules.scaling.compat.load_scales_compat(module: torch.nn.Module, scale_file: str | ScaleDict | None) None#