bittensor.utils.registration#
Attributes#
Classes#
A lazy-loading proxy for the torch module. |
Functions#
Force the use of torch over numpy for certain operations. |
|
|
Convert function operating on numpy Input&Output to legacy torch Input&Output API if use_torch() is True. |
Module Contents#
- bittensor.utils.registration.use_torch()[source]#
Force the use of torch over numpy for certain operations.
- Return type:
- bittensor.utils.registration.legacy_torch_api_compat(func)[source]#
Convert function operating on numpy Input&Output to legacy torch Input&Output API if use_torch() is True.
- Parameters:
func (function) – Function with numpy Input/Output to be decorated.
- Returns:
Decorated function.
- Return type:
decorated (function)
- class bittensor.utils.registration.LazyLoadedTorch[source]#
A lazy-loading proxy for the torch module.
- bittensor.utils.registration.torch#