docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class WorkerExtensions

    Provides extension methods for the IWorker interface.

    Inheritance
    object
    WorkerExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Sentis
    Assembly: Unity.Sentis.dll
    Syntax
    public static class WorkerExtensions

    Methods

    ExecuteAndDownloadOutputsAsync(IWorker, Dictionary<string, Tensor>, List<string>)

    Execute model and returns a CPU copy of all outputs. This is a non blocking call.

    Declaration
    public static Task<bool[]> ExecuteAndDownloadOutputsAsync(this IWorker worker, Dictionary<string, Tensor> inputs, List<string> outputs)
    Parameters
    Type Name Description
    IWorker worker

    The worker to execute.

    Dictionary<string, Tensor> inputs

    The input tensors as a dictionary.

    List<string> outputs

    The output names as a list.

    Returns
    Type Description
    Task<bool[]>

    The async task.

    ExecuteWorker(CommandBuffer, IWorker, Dictionary<string, Tensor>)

    Non-blocking API that schedules network execution on CommandBuffer in one go.

    Declaration
    public static void ExecuteWorker(this CommandBuffer cb, IWorker worker, Dictionary<string, Tensor> inputs)
    Parameters
    Type Name Description
    CommandBuffer cb

    The command buffer to schedule execution on.

    IWorker worker

    The worker to use for execution.

    Dictionary<string, Tensor> inputs

    A dictionary of input tensors.

    ExecuteWorker(CommandBuffer, IWorker, Tensor)

    Non-blocking API that schedules network execution on CommandBuffer in one go.

    Declaration
    public static void ExecuteWorker(this CommandBuffer cb, IWorker worker, Tensor input)
    Parameters
    Type Name Description
    CommandBuffer cb

    The command buffer to schedule execution on.

    IWorker worker

    The worker to use for execution.

    Tensor input

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