docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Shrink

    Shrink(TensorFloat, float, float)

    Computes an output tensor by applying the element-wise Shrink activation function: f(x) = x + bias if x < lambd. f(x) = x - bias if x > lambd. Otherwise f(x) = 0.

    Declaration
    public TensorFloat Shrink(TensorFloat X, float bias, float lambd)
    Parameters
    Type Name Description
    TensorFloat X

    The input tensor.

    float bias

    The bias value to use for the Shrink activation function.

    float lambd

    The lambda value to use for the Shrink activation function.

    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)