Aliases in torch#
Created On: Jul 22, 2025 | Last Updated On: Oct 17, 2025
The following are aliases intorch to their counterparts in the nested namespacesin which they are defined. Feel free to use either the top-level version intorch(e.g.torch.broadcast_tensors()) or the nested versiontorch.functional.broadcast_tensors().
align_tensors | |
atleast_1d | Returns a 1-dimensional view of each input tensor with zero dimensions. |
atleast_2d | Returns a 2-dimensional view of each input tensor with zero dimensions. |
atleast_3d | Returns a 3-dimensional view of each input tensor with zero dimensions. |
block_diag | Create a block diagonal matrix from provided tensors. |
broadcast_shapes | Similar to |
broadcast_tensors | Broadcasts the given tensors according toBroadcasting semantics. |
cartesian_prod | Do cartesian product of the given sequence of tensors. |
cdist | Computes batched the p-norm distance between each pair of the two collections of row vectors. |
chain_matmul | Returns the matrix product of the 2-D tensors. |
einsum | Sums the product of the elements of the input |
lu | Computes the LU factorization of a matrix or batches of matrices |
meshgrid | Creates grids of coordinates specified by the 1D inputs inattr:tensors. |
norm | Returns the matrix norm or vector norm of a given tensor. |
split | Splits the tensor into chunks. |
stft | Short-time Fourier transform (STFT). |
tensordot | Returns a contraction of a and b over multiple dimensions. |
unique | Returns the unique elements of the input tensor. |
unique_consecutive | Eliminates all but the first element from every consecutive group of equivalent elements. |
unravel_index | Converts a tensor of flat indices into a tuple of coordinate tensors that index into an arbitrary tensor of the specified shape. |