Show / Hide Table of Contents

    Method reverseAxis

    static member reverseAxis: int -> Tensor<'T> -> Tensor<'T>

    Reverses the elements in the specified dimension.

    Declaration
    static member reverseAxis: ax:int -> a:Tensor<'T> -> Tensor<'T>
    Parameters
    Type Name Description
    int ax

    The axis to reverse.

    Tensor<'T> a

    The tensor to operate on.

    Returns
    Type Description
    Tensor<'T>

    The tensor with the dimensions permuted.

    Remarks

    The elements along the specified axis are reversed.

    A view of the original tensor is returned and the storage is shared. Modifications done to the returned tensor will affect the original tensor.

    Examples
     let a = HostTensor.ofList [0; 1; 2; 3]
     let b = Tensor.reverseAxis 0 a // b = [3; 2; 1; 0]
    Back to top Generated by DocFX