Class GenericWorker
Represents a generic implementation of an IWorker.
Inherited Members
Namespace: Unity.Sentis
Assembly: solution.dll
Syntax
public class GenericWorker : IWorker, IDisposable
Constructors
Name | Description |
---|---|
Generic |
Initializes and returns an instance of |
Properties
Name | Description |
---|---|
schedule |
Returns the proportion of the model scheduled for execution since the last call to Returns 0.0 after you call The value increases each time you iterate on the |
Methods
Name | Description |
---|---|
Dispose() | Disposes of the worker and any associated memory. |
Execute() | Schedules the execution of the model on the worker. This is non-blocking. |
Execute(IDictionary<string, Tensor>) | Sets multiple tensors as the inputs of the model and schedules execution of the model. This is non-blocking. |
Execute(Tensor) | Sets a tensor as the default input of the model and schedules the execution of the model on the worker. This is non-blocking. For models with more than one input this sets the first input. |
~Generic |
Finalizes the |
Flush |
Schedules the execution of the part of the model that hasn't been scheduled yet. This is non-blocking. |
Get |
Gets the backend used by the worker for execution. |
Peek |
Returns a reference to the default output tensor. This is non-blocking. For models with more than one output this returns a reference to the first output tensor. The reference is valid only until you call If you want to dispose of the worker but keep the tensor, use |
Peek |
Returns a reference to an output tensor with a given The reference is valid only until you call If you want to dispose of the worker but keep the tensor, use |
Prepare |
Prepares the worker to execute the model using inputs of given shapes. |
Set |
Sets a tensor as a named input of the model. |
Set |
Sets a tensor as the default input of the model. For models with more than one input this sets the first input. |
Start |
Schedules the execution of the model one layer at a time. This is non-blocking. To schedule the execution of the next layer of the model, call |
Start |
Sets multiple tensors as the inputs of the model and schedules execution of the model one layer at a time. This is non-blocking. To schedule execution of the next layer of the model, call |
Start |
Sets a tensor as the default input of the model and schedules execution of the model one layer at a time. This is non-blocking. For models with more than one input this sets the first input. To schedule execution of the next layer of the model, call |
Summary() | Returns a summary of the execution as a string. |