eVision .NET API
Loading...
Searching...
No Matches
eVision.EasyDeepLearning.EDeepLearningExecutionSettings Class Reference

Execution settings for a Deep Learning tool. More...

Inheritance diagram for eVision.EasyDeepLearning.EDeepLearningExecutionSettings:
Collaboration diagram for eVision.EasyDeepLearning.EDeepLearningExecutionSettings:

Public Member Functions

 EDeepLearningExecutionSettings ()
 Constructs a EDeepLearningExecutionSettings.
 EDeepLearningExecutionSettings (eVision.EasyDeepLearning.EDeepLearningExecutionSettings other)
 Copy constructor.
void CopyTo (eVision.EasyDeepLearning.EDeepLearningExecutionSettings other)
 Copy the object to another one.
virtual void Load (string filePath)
 Loads the EDeepLearningExecutionSettings. The given ESerializer must have been created for reading.
virtual void Load (eVision.ESerializer serializer)
 Loads the EDeepLearningExecutionSettings. The given ESerializer must have been created for reading.
virtual void Save (string filePath)
 Saves the EDeepLearningExecutionSettings. The given ESerializer must have been created for writing.
virtual void Save (eVision.ESerializer serializer)
 Saves the EDeepLearningExecutionSettings. The given ESerializer must have been created for writing.
string GetAvailableDeviceName (int i)
 Name of the i-th device of the current engine.
eVision.EasyDeepLearning.EDeepLearningDevice GetAvailableDevice (int i)
 Gets the i-th EDeepLearningDevice of the current engine.
void SetDevice (eVision.EasyDeepLearning.EDeepLearningDevice device)
 Sets the device with which to run or train the model.
eVision.EasyDeepLearning.EDeepLearningDevice GetDevice (int i)
 Gets an active device. By default, it returns the first active device.
eVision.EasyDeepLearning.EDeepLearningDevice GetDevice ()
 Gets an active device. By default, it returns the first active device.

Static Public Member Functions

static string GetAvailableEngineName (int id)
 Gets the name of the engine given its id.
static eVision.EasyDeepLearning.EDeepLearningDevice[] GetAvailableDevicesForEngine (string engine)
 Available devices for the specified engine.

Properties

string Engine [get, set]
 Engine with which to execute or train the neural network.
eVision.EasyDeepLearning.EDeepLearningInferencePrecision InferencePrecision [get, set]
 Inference precision.
int NumAvailableDevices [get]
 Available devices for the current EDeepLearningExecutionSettings.Engine.
eVision.EasyDeepLearning.EDeepLearningDevice[] AvailableDevices [get]
 Get all available device for the current engine.
int NumDevices [get]
 Number of devices configured in this execution context.
string DeviceByName [set]
 Sets the device with which to run the model using its name.
int DeviceById [set]
 Sets the device with which to run the model using its index in the list returned by EDeepLearningExecutionSettings.AvailableDevices.
eVision.EasyDeepLearning.EDeepLearningDevice[] Devices [get, set]
 Devices with which to run or train the model.
int BatchSize [get, set]
 Batch size. The batch size is the number of images that are processed together during training and batch inference.
bool OptimizeBatchSize [get, set]
 Indicates whether to optimize the batch size (see EDeepLearningExecutionSettings.BatchSize) to maximize the training and inference speed according to the engine, device and the available memory.
static int NumAvailableEngines [get]
 Number of available engines.
static string[] AvailableEngines [get]
 Available engines.

Detailed Description

Execution settings for a Deep Learning tool.

License(s): BasicTypes

Constructor & Destructor Documentation

◆ EDeepLearningExecutionSettings() [1/2]

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.EDeepLearningExecutionSettings ( )

◆ EDeepLearningExecutionSettings() [2/2]

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.EDeepLearningExecutionSettings ( eVision.EasyDeepLearning.EDeepLearningExecutionSettings other)

Copy constructor.

Parameters
otherThe other EDeepLearningExecutionSettings that we will copy into this one.

Member Function Documentation

◆ CopyTo()

void eVision.EasyDeepLearning.EDeepLearningExecutionSettings.CopyTo ( eVision.EasyDeepLearning.EDeepLearningExecutionSettings other)

Copy the object to another one.

Parameters
otherThe other EDeepLearningExecutionSettings that we will copy this one into.

◆ GetAvailableDevice()

eVision.EasyDeepLearning.EDeepLearningDevice eVision.EasyDeepLearning.EDeepLearningExecutionSettings.GetAvailableDevice ( int i)

Gets the i-th EDeepLearningDevice of the current engine.

Parameters
iIndex of the device between 0 and EDeepLearningExecutionSettings.NumAvailableDevices - 1.

◆ GetAvailableDeviceName()

string eVision.EasyDeepLearning.EDeepLearningExecutionSettings.GetAvailableDeviceName ( int i)

Name of the i-th device of the current engine.

Parameters
iIndex of the device between 0 and EDeepLearningExecutionSettings.NumAvailableDevices - 1.

◆ GetAvailableDevicesForEngine()

eVision.EasyDeepLearning.EDeepLearningDevice[] eVision.EasyDeepLearning.EDeepLearningExecutionSettings.GetAvailableDevicesForEngine ( string engine)
static

Available devices for the specified engine.

Parameters
engineEngine for which to get the devices

◆ GetAvailableEngineName()

string eVision.EasyDeepLearning.EDeepLearningExecutionSettings.GetAvailableEngineName ( int id)
static

Gets the name of the engine given its id.

Parameters
idIndex of the available engine between 0 and EDeepLearningExecutionSettings.NumAvailableEngines - 1.

◆ GetDevice() [1/2]

eVision.EasyDeepLearning.EDeepLearningDevice eVision.EasyDeepLearning.EDeepLearningExecutionSettings.GetDevice ( )

Gets an active device. By default, it returns the first active device.

◆ GetDevice() [2/2]

eVision.EasyDeepLearning.EDeepLearningDevice eVision.EasyDeepLearning.EDeepLearningExecutionSettings.GetDevice ( int i)

Gets an active device. By default, it returns the first active device.

Parameters
iIndex of the active devices between 0 and EDeepLearningExecutionSettings.NumDevices.

◆ Load() [1/2]

virtual void eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Load ( eVision.ESerializer serializer)
virtual

Loads the EDeepLearningExecutionSettings. The given ESerializer must have been created for reading.

Parameters
serializerPointer to the ESerializer created for reading.

Loading a EDeepLearningExecutionSettings can trigger exceptions if the engine and/or device is not available on the machine.

◆ Load() [2/2]

virtual void eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Load ( string filePath)
virtual

Loads the EDeepLearningExecutionSettings. The given ESerializer must have been created for reading.

Parameters
filePathFile path.

Loading a EDeepLearningExecutionSettings can trigger exceptions if the engine and/or device is not available on the machine.

◆ Save() [1/2]

virtual void eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Save ( eVision.ESerializer serializer)
virtual

Saves the EDeepLearningExecutionSettings. The given ESerializer must have been created for writing.

Parameters
serializerPointer to the ESerializer created for writing.

◆ Save() [2/2]

virtual void eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Save ( string filePath)
virtual

Saves the EDeepLearningExecutionSettings. The given ESerializer must have been created for writing.

Parameters
filePathFile path.

◆ SetDevice()

void eVision.EasyDeepLearning.EDeepLearningExecutionSettings.SetDevice ( eVision.EasyDeepLearning.EDeepLearningDevice device)

Sets the device with which to run or train the model.

Parameters
deviceDevice

For CPU device, the number of thread is initialized from Easy.MaxNumberOfProcessingThreads.

If the specified device does support the current EDeepLearningExecutionSettings.InferencePrecision, it will be set to EDeepLearningDevice.DefaultPrecision.

Property Documentation

◆ AvailableDevices

eVision.EasyDeepLearning.EDeepLearningDevice [] eVision.EasyDeepLearning.EDeepLearningExecutionSettings.AvailableDevices
get

Get all available device for the current engine.

◆ AvailableEngines

string [] eVision.EasyDeepLearning.EDeepLearningExecutionSettings.AvailableEngines
staticget

Available engines.

◆ BatchSize

int eVision.EasyDeepLearning.EDeepLearningExecutionSettings.BatchSize
getset

Batch size. The batch size is the number of images that are processed together during training and batch inference.

When using multi-GPUs processing, the batch size is the number of images that each GPU will process at once.

A large batch size will increase the processing speed on GPU but also the memory requirements.

The batch size must be bigger or equal to 1 and it is commonly chosen to be a power of 2.

If EDeepLearningExecutionSettings.OptimizeBatchSize is 'true', then the value of this property will not be taken into account because it will be optimized automatically for training or inference according to the situation.

◆ DeviceById

int eVision.EasyDeepLearning.EDeepLearningExecutionSettings.DeviceById
set

Sets the device with which to run the model using its index in the list returned by EDeepLearningExecutionSettings.AvailableDevices.

◆ DeviceByName

string eVision.EasyDeepLearning.EDeepLearningExecutionSettings.DeviceByName
set

Sets the device with which to run the model using its name.

◆ Devices

eVision.EasyDeepLearning.EDeepLearningDevice [] eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Devices
getset

Devices with which to run or train the model.

Using multiple GPUs is only supported by the default engine.

If the specified devices don't support the current EDeepLearningExecutionSettings.InferencePrecision, it will be set to EDeepLearningDevice.DefaultPrecision.

◆ Engine

string eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Engine
getset

Engine with which to execute or train the neural network.

◆ InferencePrecision

eVision.EasyDeepLearning.EDeepLearningInferencePrecision eVision.EasyDeepLearning.EDeepLearningExecutionSettings.InferencePrecision
getset

Inference precision.

Use EDeepLearningDevice.IsPrecisionSupported to check whether a device support the given precision.

◆ NumAvailableDevices

int eVision.EasyDeepLearning.EDeepLearningExecutionSettings.NumAvailableDevices
get

Available devices for the current EDeepLearningExecutionSettings.Engine.

◆ NumAvailableEngines

int eVision.EasyDeepLearning.EDeepLearningExecutionSettings.NumAvailableEngines
staticget

Number of available engines.

◆ NumDevices

int eVision.EasyDeepLearning.EDeepLearningExecutionSettings.NumDevices
get

Number of devices configured in this execution context.

◆ OptimizeBatchSize

bool eVision.EasyDeepLearning.EDeepLearningExecutionSettings.OptimizeBatchSize
getset

Indicates whether to optimize the batch size (see EDeepLearningExecutionSettings.BatchSize) to maximize the training and inference speed according to the engine, device and the available memory.

Default value is true.