UnsqueezeΒΆ

Insert single-dimensional entries to the shape of an input tensor (data). Takes one required input axes - which contains a list of dimension indices and this operator will insert a dimension of value 1 into the corresponding index of the output tensor (expanded). For example, given an input …

Abstract Signature:

Unsqueeze(data: Tensor, axes: int)

PyTorch

API: torch.unsqueeze
Strategy: Direct Mapping

JAX (Core)

API: jax.numpy.expand_dims
Strategy: Direct Mapping