docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Pad

    Pad(ReadOnlySpan<int>)

    Creates a TensorShape by padding axes. For example, if this is (1, 2, 3), and pads is {0, 0, 1, 0, 2, 2}, the method returns (1, 3, 7).

    Declaration
    public TensorShape Pad(ReadOnlySpan<int> pads)
    Parameters
    Type Name Description
    ReadOnlySpan<int> pads

    The lower and upper padding values for each dimension. For example [pad_left, pad_right] for 1D, or [pad_top, pad_bottom, pad_left, pad_right] for 2D.

    Returns
    Type Description
    TensorShape

    The padded 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)