MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / register_float_function

Function register_float_function

PATH/core/fp16/amp.py:44–48  ·  view source on GitHub ↗
(module, name)

Source from the content-addressed store, hash-verified

42 _USER_CAST_REGISTRY.add((module, name, utils.maybe_half))
43
44def register_float_function(module, name):
45 if not hasattr(module, name):
46 raise ValueError('No function named {} in module {}.'.format(
47 name, module))
48 _USER_CAST_REGISTRY.add((module, name, utils.maybe_float))
49
50def register_float_module(module, cast_args=True):
51 if not issubclass(module, torch.nn.modules.module.Module):

Callers 1

register_float_moduleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected