OneHot ====== Produces a one-hot tensor based on inputs. The locations represented by the index values in the 'indices' input tensor will have 'on_value' and the other locations will have 'off_value' in the output tensor, where 'on_value' and 'off_value' are specified as part of required input argument 'values', ... **Abstract Signature:** ``OneHot(indices, depth, values, axis: int)`` .. raw:: html

PyTorch

API: torch.nn.functional.one_hot
Strategy: Direct Mapping

JAX (Core)

API: jax.nn.one_hot
Strategy: Direct Mapping

Apple MLX

API: mlx.nn.OneHot
Strategy: Direct Mapping