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
Syntax
public struct WorkerConfiguration
Constructors
WorkerConfiguration(WorkerFactory.Type, Boolean, CompareOpsUtils.LogLevel, Single, Boolean)
Construct worker configuration
Declaration
public WorkerConfiguration(WorkerFactory.Type compareAgainstType, bool verbose = false, CompareOpsUtils.LogLevel compareLogLevel = CompareOpsUtils.LogLevel.Warning, float compareEpsilon = 0.0001F, bool takeoverWeights = false)
Parameters
Type | Name | Description |
---|---|---|
WorkerFactory.Type | compareAgainstType | Compare layer by layer outputs against other worker type |
Boolean | verbose | Print debug information on model execution to the console |
CompareOpsUtils.LogLevel | compareLogLevel | Comparison log level |
Single | compareEpsilon | Comparison error tolerance |
Boolean | 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 |
---|---|
Single |
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 |
---|---|
Boolean |
verbose
Print debug information on model execution to the console
Declaration
public bool verbose
Field Value
Type | Description |
---|---|
Boolean |