• Get the permutation for a given input tensor.

    Parameters

    • nDims: number

      Total number of dimension of all tensors involved in the einsum operation.

    • idDims: number[]

      Dimension indices involve in the tensor in question.

    Returns {
        expandDims: number[];
        permutationIndices: number[];
    }

    An object consisting of the following fields:

    • permutationIndices: Indices to permute the axes of the tensor with.
    • expandDims: Indices to the dimension that need to be expanded from the tensor after permutation.
    • expandDims: number[]
    • permutationIndices: number[]

Generated using TypeDoc