docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Resize

    Resize(TensorFloat, ReadOnlySpan<float>, InterpolationMode, NearestMode, CoordTransformMode)

    Calculates an output tensor by resampling the input tensor along the spatial dimensions with given scales.

    Declaration
    public TensorFloat Resize(TensorFloat X, ReadOnlySpan<float> scale, InterpolationMode interpolationMode, NearestMode nearestMode = NearestMode.RoundPreferFloor, CoordTransformMode coordTransformMode = CoordTransformMode.HalfPixel)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    ReadOnlySpan<float> scale

    The factor to scale each dimension by.

    InterpolationMode interpolationMode

    The InterpolationMode to use for the operation.

    NearestMode nearestMode

    The NearestMode to use for the operation when using InterpolationMode.NearestMode. The default is NearestMode.RoundPreferFloor.

    CoordTransformMode coordTransformMode

    The CoordTransformMode to use for the operation. The default is CoordTransformMode.HalfPixel.

    Returns
    Type Description
    TensorFloat

    The computed output tensor.

    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)