docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class StatsOps

    Proxy IOps implementation for tracking computational expenses for specific model

    Inheritance
    object
    StatsOps
    Implements
    IOps
    IOpsStatistics
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Barracuda
    Assembly: solution.dll
    Syntax
    public class StatsOps : IOps, IOpsStatistics

    Constructors

    StatsOps(IOps)

    Create StatsOps

    Declaration
    public StatsOps(IOps ops)
    Parameters
    Type Name Description
    IOps ops

    target ops

    Methods

    GetModelExecutionsReporter()

    Get model executions reporter

    Declaration
    public IModelExecutionsReporter GetModelExecutionsReporter()
    Returns
    Type Description
    IModelExecutionsReporter

    model executions reporter

    LSTM(Tensor, Tensor[], Tensor[], Tensor[], Tensor[], Tensor, Tensor)

    LSTM

    Declaration
    public Tensor[] LSTM(Tensor X, Tensor[] W, Tensor[] R, Tensor[] Wb, Tensor[] Rb, Tensor hidden, Tensor cell)
    Parameters
    Type Name Description
    Tensor X

    The input sequences packed into one 3-D tensor.

    Tensor[] W

    W parameter weight matrix for input, output, forget, and cell gates - W[iofc]

    Tensor[] R

    R recurrence weight matrix for input, output, forget, and cell gates - R[iofc]

    Tensor[] Wb

    W bias vectors for input, output, forget, and cell gates - Wb[iofc]

    Tensor[] Rb

    R bias vectors for input, output, forget, and cell gates - Rb[iofc]

    Tensor hidden

    Initial value of the hidden

    Tensor cell

    Initial value of the cell

    Returns
    Type Description
    Tensor[]

    [Y (concatenated intermediate values of the hidden), Y_h (final hidden), Y_c (final cell)]

    NonZero(Tensor)

    Indices for non zero values

    Declaration
    public Tensor NonZero(Tensor X)
    Parameters
    Type Name Description
    Tensor X

    input

    Returns
    Type Description
    Tensor

    output Tensor

    PostLayerCleanup()

    Called after every layer execution. It allows IOps to run cleanup operations such as clearing temporary buffers only used in the scope of the last layer executed.

    Declaration
    public virtual void PostLayerCleanup()

    PreExecuteLayer(Layer, Tensor[])

    Prepare for layer execution

    Declaration
    public virtual void PreExecuteLayer(Layer layer, Tensor[] inputs)
    Parameters
    Type Name Description
    Layer layer

    layer

    Tensor[] inputs

    inputs

    PrepareModel(Model, IDictionary<string, TensorShape>, IVars)

    Prepare model for execution, allocating required intermediate tensors

    Declaration
    public virtual void PrepareModel(Model model, IDictionary<string, TensorShape> inputShapes, IVars vars)
    Parameters
    Type Name Description
    Model model

    model

    IDictionary<string, TensorShape> inputShapes

    input shapes

    IVars vars

    model variables

    ToString()

    Build execution summary

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    execution summary

    Overrides
    object.ToString()

    TopKValues(Tensor, Tensor, int)

    Top K values

    Declaration
    public Tensor TopKValues(Tensor X, Tensor I, int axis)
    Parameters
    Type Name Description
    Tensor X

    input

    Tensor I

    indices

    int axis

    axis

    Returns
    Type Description
    Tensor

    output Tensor

    Implements

    IOps
    IOpsStatistics
    In This Article
    Back to top
    Copyright © 2025 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)