5.23.9. utils.handle_torch

eminus.utils.handle_torch(func, *args, **kwargs)[source]

Use a function optimized with Torch if available.

Parameters:
  • func – Function with a Torch alternative.

  • args – Pass-through arguments.

Keyword Arguments:

kwargs – Pass-through keyword arguments.

Returns:

Decorator.