docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Ones

    Ones(int)

    Creates a TensorShape with a given rank where all of the dimensions are 1. For example if rank is 3, the method returns (1, 1, 1).

    Declaration
    public static TensorShape Ones(int rank)
    Parameters
    Type Name Description
    int rank

    The rank of the tensor shape.

    Returns
    Type Description
    TensorShape

    The created tensor shape.

    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)