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

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

Public Member Functions

None __init__ (self)
 Constructs a eVision.EasyDeepLearning.EDeepLearningExecutionSettings.
None __init__ (self, eVision.EasyDeepLearning.EDeepLearningExecutionSettings other)
 Copy constructor.
None CopyTo (self, eVision.EasyDeepLearning.EDeepLearningExecutionSettings other)
 Copy the object to another one.
None Load (self, str filePath)
 Loads the eVision.EasyDeepLearning.EDeepLearningExecutionSettings.
None Load (self, eVision.ESerializer|None serializer)
 Loads the eVision.EasyDeepLearning.EDeepLearningExecutionSettings.
None Save (self, str filePath)
 Saves the eVision.EasyDeepLearning.EDeepLearningExecutionSettings.
None Save (self, eVision.ESerializer|None serializer)
 Saves the eVision.EasyDeepLearning.EDeepLearningExecutionSettings.
str GetAvailableDeviceName (self, int i)
 Name of the i-th device of the current engine.
eVision.EasyDeepLearning.EDeepLearningDevice GetAvailableDevice (self, int i)
 Gets the i-th eVision.EasyDeepLearning.EDeepLearningDevice of the current engine.
None SetDevice (self, eVision.EasyDeepLearning.EDeepLearningDevice device)
 Sets the device with which to run or train the model.
eVision.EasyDeepLearning.EDeepLearningDevice GetDevice (self, int i)
 Gets an active device.
eVision.EasyDeepLearning.EDeepLearningDevice GetDevice (self)
 Gets an active device.
str Engine (self)
 Engine with which to execute or train the neural network.
 Engine (self, str value)
 Engine with which to execute or train the neural network.
eVision.EasyDeepLearning.EDeepLearningInferencePrecision InferencePrecision (self)
 Inference precision.
 InferencePrecision (self, eVision.EasyDeepLearning.EDeepLearningInferencePrecision value)
 Inference precision.
int NumAvailableDevices (self)
 Available devices for the current eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Engine.
list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] AvailableDevices (self)
 Get all available device for the current engine.
int NumDevices (self)
 Number of devices configured in this execution context.
list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] Devices (self)
 Devices with which to run or train the model.
 Devices (self, list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] value)
 Devices with which to run or train the model.
int BatchSize (self)
 Batch size.
 BatchSize (self, int value)
 Batch size.
bool OptimizeBatchSize (self)
 Indicates whether to optimize the batch size (see eVision.EasyDeepLearning.EDeepLearningExecutionSettings.BatchSize) to maximize the training and inference speed according to the engine, device and the available memory.
 OptimizeBatchSize (self, bool value)
 Indicates whether to optimize the batch size (see eVision.EasyDeepLearning.EDeepLearningExecutionSettings.BatchSize) to maximize the training and inference speed according to the engine, device and the available memory.

Static Public Member Functions

int GetNumAvailableEngines ()
 Number of available engines.
str GetAvailableEngineName (int id)
 Gets the name of the engine given its id.
list[str] GetAvailableEngines ()
 Available engines.
list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] GetAvailableDevicesForEngine (str engine)
 Available devices for the specified engine.

Protected Member Functions

 _DeviceByName__setter (self, str value)
 Sets the device with which to run the model using its name.
 _DeviceById__setter (self, int value)
 Sets the device with which to run the model using its index in the list returned by eVision.EasyDeepLearning.EDeepLearningExecutionSettings.AvailableDevices.

Properties

 DeviceByName
 DeviceById

Detailed Description

Execution settings for a Deep Learning tool.

Remarks:

License(s): BasicTypes

Constructor & Destructor Documentation

◆ __init__() [1/2]

None eVision.EasyDeepLearning.EDeepLearningExecutionSettings.__init__ ( self)

◆ __init__() [2/2]

None eVision.EasyDeepLearning.EDeepLearningExecutionSettings.__init__ ( self,
eVision.EasyDeepLearning.EDeepLearningExecutionSettings other )

Copy constructor.

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

Member Function Documentation

◆ _DeviceById__setter()

eVision.EasyDeepLearning.EDeepLearningExecutionSettings._DeviceById__setter ( self,
int value )
protected

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

◆ _DeviceByName__setter()

eVision.EasyDeepLearning.EDeepLearningExecutionSettings._DeviceByName__setter ( self,
str value )
protected

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

◆ AvailableDevices()

list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] eVision.EasyDeepLearning.EDeepLearningExecutionSettings.AvailableDevices ( self)

Get all available device for the current engine.

◆ BatchSize() [1/2]

int eVision.EasyDeepLearning.EDeepLearningExecutionSettings.BatchSize ( self)

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.

Remarks:

If eVision.EasyDeepLearning.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.

◆ BatchSize() [2/2]

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.BatchSize ( self,
int value )

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.

Remarks:

If eVision.EasyDeepLearning.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.

◆ CopyTo()

None eVision.EasyDeepLearning.EDeepLearningExecutionSettings.CopyTo ( self,
eVision.EasyDeepLearning.EDeepLearningExecutionSettings other )

Copy the object to another one.

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

◆ Devices() [1/2]

list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Devices ( self)

Devices with which to run or train the model.

Using multiple GPUs is only supported by the default engine.

Remarks:

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

◆ Devices() [2/2]

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Devices ( self,
list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] value )

Devices with which to run or train the model.

Using multiple GPUs is only supported by the default engine.

Remarks:

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

◆ Engine() [1/2]

str eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Engine ( self)

Engine with which to execute or train the neural network.

◆ Engine() [2/2]

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Engine ( self,
str value )

Engine with which to execute or train the neural network.

◆ GetAvailableDevice()

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

Gets the i-th eVision.EasyDeepLearning.EDeepLearningDevice of the current engine.

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

◆ GetAvailableDeviceName()

str eVision.EasyDeepLearning.EDeepLearningExecutionSettings.GetAvailableDeviceName ( self,
int i )

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

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

◆ GetAvailableDevicesForEngine()

list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] eVision.EasyDeepLearning.EDeepLearningExecutionSettings.GetAvailableDevicesForEngine ( str engine)
static

Available devices for the specified engine.

Parameters
engineEngine for which to get the devices

◆ GetAvailableEngineName()

str 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 eVision.EasyDeepLearning.EDeepLearningExecutionSettings.GetNumAvailableEngines - 1.

◆ GetAvailableEngines()

list[str] eVision.EasyDeepLearning.EDeepLearningExecutionSettings.GetAvailableEngines ( )
static

Available engines.

◆ GetDevice() [1/2]

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

Gets an active device.

By default, it returns the first active device.

◆ GetDevice() [2/2]

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

Gets an active device.

By default, it returns the first active device.

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

◆ GetNumAvailableEngines()

int eVision.EasyDeepLearning.EDeepLearningExecutionSettings.GetNumAvailableEngines ( )
static

Number of available engines.

◆ InferencePrecision() [1/2]

eVision.EasyDeepLearning.EDeepLearningInferencePrecision eVision.EasyDeepLearning.EDeepLearningExecutionSettings.InferencePrecision ( self)

Inference precision.

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

◆ InferencePrecision() [2/2]

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.InferencePrecision ( self,
eVision.EasyDeepLearning.EDeepLearningInferencePrecision value )

Inference precision.

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

◆ Load() [1/2]

None eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Load ( self,
eVision.ESerializer | None serializer )

Loads the eVision.EasyDeepLearning.EDeepLearningExecutionSettings.

The given eVision.ESerializer must have been created for reading.

Remarks:

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

Parameters
serializerPointer to the eVision.ESerializer created for reading.

◆ Load() [2/2]

None eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Load ( self,
str filePath )

Loads the eVision.EasyDeepLearning.EDeepLearningExecutionSettings.

The given eVision.ESerializer must have been created for reading.

Remarks:

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

Parameters
filePathFile path.

◆ NumAvailableDevices()

int eVision.EasyDeepLearning.EDeepLearningExecutionSettings.NumAvailableDevices ( self)

◆ NumDevices()

int eVision.EasyDeepLearning.EDeepLearningExecutionSettings.NumDevices ( self)

Number of devices configured in this execution context.

◆ OptimizeBatchSize() [1/2]

bool eVision.EasyDeepLearning.EDeepLearningExecutionSettings.OptimizeBatchSize ( self)

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

Default value is true.

◆ OptimizeBatchSize() [2/2]

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.OptimizeBatchSize ( self,
bool value )

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

Default value is true.

◆ Save() [1/2]

None eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Save ( self,
eVision.ESerializer | None serializer )

Saves the eVision.EasyDeepLearning.EDeepLearningExecutionSettings.

The given eVision.ESerializer must have been created for writing.

Parameters
serializerPointer to the eVision.ESerializer created for writing.

◆ Save() [2/2]

None eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Save ( self,
str filePath )

Saves the eVision.EasyDeepLearning.EDeepLearningExecutionSettings.

The given eVision.ESerializer must have been created for writing.

Parameters
filePathFile path.

◆ SetDevice()

None eVision.EasyDeepLearning.EDeepLearningExecutionSettings.SetDevice ( self,
eVision.EasyDeepLearning.EDeepLearningDevice device )

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

Remarks:

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

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

Parameters
deviceDevice

Property Documentation

◆ DeviceById

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.DeviceById
static
Initial value:
= property(None, _DeviceById__setter, None,
)

◆ DeviceByName

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.DeviceByName
static
Initial value:
= property(None, _DeviceByName__setter, None,
)