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 |
|---|---|
| GenericWorker(Model, IBackend, IVars, bool, bool) | Initializes and returns an instance of |
Properties
| Name | Description |
|---|---|
| scheduleProgress | 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. |
| ~GenericWorker() | Finalizes the |
| FlushSchedule(bool) | Schedules the execution of the part of the model that hasn't been scheduled yet. This is non-blocking. |
| GetBackend() | Gets the backend used by the worker for execution. |
| PeekOutput() | 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 |
| PeekOutput(string) | 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 |
| PrepareForInput(IDictionary<string, TensorShape>) | Prepares the worker to execute the model using inputs of given shapes. |
| SetInput(string, Tensor) | Sets a tensor as a named input of the model. |
| SetInput(Tensor) | Sets a tensor as the default input of the model. For models with more than one input this sets the first input. |
| StartManualSchedule() | 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 |
| StartManualSchedule(IDictionary<string, Tensor>) | 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 |
| StartManualSchedule(Tensor) | 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. |