Method CreateWorker
CreateWorker(ModelAsset, DeviceType, bool)
Initializes and returns an instance of IWorker with a modelAsset to execute. Sentis selects the best backend type available for device.
This is a convenience method that internally calls ModelLoader.Load followed by WorkerFactory.CreateWorker.
Declaration
public static IWorker CreateWorker(this ModelAsset modelAsset, DeviceType deviceType, bool verbose = false)
Parameters
| Type | Name | Description |
|---|---|---|
| ModelAsset | modelAsset | The model asset to execute. |
| DeviceType | deviceType | The preferred device for execution. For example |
| bool | verbose | Whether to log scheduling of layers execution to the console. |
Returns
| Type | Description |
|---|---|
| IWorker | The instantiated |