docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Triu

    Triu<T>(T, int)

    Computes the output tensor by retaining the upper triangular values from an input matrix or matrix batch and setting the other values to zero.

    Declaration
    public T Triu<T>(T X, int k = 0) where T : Tensor
    Parameters
    Type Name Description
    T X

    The input tensor.

    int k

    The offset from the diagonal to exclude.

    Returns
    Type Description
    T

    The computed output tensor.

    Type Parameters
    Name Description
    T

    The tensor type.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)