Class RecurrentState | Barracuda | 1.0.4
docs.unity.cn
    Show / Hide Table of Contents

    Class RecurrentState

    Object that represent memory (recurrent state) between the executions of a given model.

    Inheritance
    Object
    RecurrentState
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Barracuda
    Syntax
    public class RecurrentState : IDisposable

    Constructors

    RecurrentState(Model, Int32, Dictionary<String, Tensor>)

    Constructs recurrent state for a specific model model is the associated model. batchSize has to match the batch dimension of the input tensor(s). Specifying -1 will use batch size of the memory tensors as declared in the model. grabFromInputs optional dictionary of named tensors that can be used as a memory. If name of the tensor matches the memory, tensor will be removed from the dictionary and used as memory.

    Declaration
    public RecurrentState(Model model, int batchSize = -1, Dictionary<string, Tensor> grabFromInputs = null)
    Parameters
    Type Name Description
    Model model
    Int32 batchSize
    Dictionary<String, Tensor> grabFromInputs

    Methods

    AfterExecution(IWorker)

    Internal callback called after execution of the model finished. This callback stores results of the current iteration in the memory.

    Declaration
    public void AfterExecution(IWorker worker)
    Parameters
    Type Name Description
    IWorker worker

    BeforeExecution(IWorker)

    Internal callback called before the execution of the model. This callback prepares model for the next iteration according to the memory.

    Declaration
    public void BeforeExecution(IWorker worker)
    Parameters
    Type Name Description
    IWorker worker

    Dispose()

    Declaration
    public virtual void Dispose()
    Implements
    IDisposable.Dispose()

    Finalize()

    Declaration
    protected void Finalize()

    GetBatchSize()

    Returns batch dimension used for the memories.

    Declaration
    public int GetBatchSize()
    Returns
    Type Description
    Int32
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 20 October 2020