(module, name)
| 42 | _USER_CAST_REGISTRY.add((module, name, utils.maybe_half)) |
| 43 | |
| 44 | def 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 | |
| 50 | def register_float_module(module, cast_args=True): |
| 51 | if not issubclass(module, torch.nn.modules.module.Module): |
no outgoing calls
no test coverage detected