Determines the correct framework to dispatch to given a sequence of tensor-like objects.


values (Sequence[tensor_like]) – a sequence of tensor like objects


the name of the interface

Return type


To determine the framework to dispatch to, the following rules are applied:

  • Tensors that are incompatible (such as Torch and TensorFlow tensors) cannot both be present.

  • Autograd tensors may be present alongside Torch and TensorFlow tensors, but Torch and TensorFlow take precendence; the autograd arrays will be treated as non-differentiable NumPy arrays. A warning will be raised suggesting that vanilla NumPy be used instead.

  • Vanilla NumPy arrays can be used alongside other tensor objects; they will always be treated as non-differentiable constants.