Struct WorkerFactory.WorkerConfiguration
Worker configuration
compareAgainstType if different than the worker type, the model will be run on both backend and result of every layer will be compared, checking for divergence. Great for debugging, but very slow because of the sync needed.
verbose will log scheduling of layers execution to the console (default == false).
compareLogLevel define how difference will be reported (default == Warning).
compareEpsilon the maximum tolerance before a difference is reported (default == 0.0001f).
Inherited Members
Namespace: Unity.Barracuda
Assembly: Unity.Barracuda.dll
Syntax
public struct WorkerFactory.WorkerConfiguration
Constructors
WorkerConfiguration(Type, bool, LogLevel, float, bool)
Construct worker configuration
Declaration
public WorkerConfiguration(WorkerFactory.Type compareAgainstType, bool verbose = false, CompareOpsUtils.LogLevel compareLogLevel = LogLevel.Warning, float compareEpsilon = 0.0001, bool takeoverWeights = false)
Parameters
| Type | Name | Description |
|---|---|---|
| WorkerFactory.Type | compareAgainstType | Compare layer by layer outputs against other worker type |
| bool | verbose | Print debug information on model execution to the console |
| CompareOpsUtils.LogLevel | compareLogLevel | Comparison log level |
| float | compareEpsilon | Comparison error tolerance |
| bool | takeoverWeights |
Fields
compareAgainstType
Compare layer by layer outputs against other worker type
Declaration
public WorkerFactory.Type compareAgainstType
Field Value
| Type | Description |
|---|---|
| WorkerFactory.Type |
compareEpsilon
Comparison error tolerance
Declaration
public float compareEpsilon
Field Value
| Type | Description |
|---|---|
| float |
compareLogLevel
Comparison log level
Declaration
public CompareOpsUtils.LogLevel compareLogLevel
Field Value
| Type | Description |
|---|---|
| CompareOpsUtils.LogLevel |
takeoverWeights
If true the worker is allowed to take ownership of the weights memory from the model this is useful so worker to limit memory pressure when the worker need to copy those weight to a different device.
Declaration
public bool takeoverWeights
Field Value
| Type | Description |
|---|---|
| bool |
verbose
Print debug information on model execution to the console
Declaration
public bool verbose
Field Value
| Type | Description |
|---|---|
| bool |