docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetTensorLayout

    SetTensorLayout(int, int, int, int)

    Sets the layout of the input tensor with four int values.

    Declaration
    public TextureTransform SetTensorLayout(int tensorLayoutAxisN, int tensorLayoutAxisC, int tensorLayoutAxisH, int tensorLayoutAxisW)
    Parameters
    Type Name Description
    int tensorLayoutAxisN

    The axis in the tensor for the batch size of the texture.

    int tensorLayoutAxisC

    The axis in the tensor for the channel count of the texture.

    int tensorLayoutAxisH

    The axis in the tensor for the height of the texture.

    int tensorLayoutAxisW

    The axis in the tensor for the width of the texture.

    Returns
    Type Description
    TextureTransform

    TextureTransform that you can use to chain other methods.

    SetTensorLayout(TensorLayout)

    Sets the layout of the input tensor with a TensorLayout object, for example TensorLayout.NHWC. The default is TensorLayout.NCHW.

    Declaration
    public TextureTransform SetTensorLayout(TensorLayout tensorLayout)
    Parameters
    Type Name Description
    TensorLayout tensorLayout
    Returns
    Type Description
    TextureTransform

    TextureTransform that you can use to chain other methods.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    Thrown if unknown TensorLayout is used.

    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)