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.

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

str _Engine__getter (self)
 \cond
 _Engine__setter (self, str value)
 Engine with which to execute or train the neural network.
eVision.EasyDeepLearning.EDeepLearningInferencePrecision _InferencePrecision__getter (self)
 \cond
 _InferencePrecision__setter (self, eVision.EasyDeepLearning.EDeepLearningInferencePrecision value)
 Inference precision.
int _NumAvailableDevices__getter (self)
 \cond
list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] _AvailableDevices__getter (self)
 \cond
int _NumDevices__getter (self)
 \cond
 _DeviceByName__setter (self, str value)
 \cond
 _DeviceById__setter (self, int value)
 \cond
list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] _Devices__getter (self)
 \cond
 _Devices__setter (self, list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] value)
 Devices with which to run or train the model.
int _BatchSize__getter (self)
 \cond
 _BatchSize__setter (self, int value)
 Batch size.
bool _OptimizeBatchSize__getter (self)
 \cond
 _OptimizeBatchSize__setter (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.

Properties

 Engine = property(_Engine__getter, _Engine__setter)
 \endcond
 InferencePrecision = property(_InferencePrecision__getter, _InferencePrecision__setter)
 \endcond
 NumAvailableDevices = property(_NumAvailableDevices__getter, None)
 \endcond
 AvailableDevices = property(_AvailableDevices__getter, None)
 \endcond
 NumDevices = property(_NumDevices__getter, None)
 \endcond
 DeviceByName = property(None, _DeviceByName__setter)
 \endcond
 DeviceById = property(None, _DeviceById__setter)
 \endcond
 Devices = property(_Devices__getter, _Devices__setter)
 \endcond
 BatchSize = property(_BatchSize__getter, _BatchSize__setter)
 \endcond
 OptimizeBatchSize = property(_OptimizeBatchSize__getter, _OptimizeBatchSize__setter)
 \endcond

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

◆ _AvailableDevices__getter()

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

\cond

Get all available device for the current engine.

◆ _BatchSize__getter()

int eVision.EasyDeepLearning.EDeepLearningExecutionSettings._BatchSize__getter ( self)
protected

\cond

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__setter()

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

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.

◆ _DeviceById__setter()

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

\cond

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

\cond

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

◆ _Devices__getter()

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

\cond

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__setter()

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

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__getter()

str eVision.EasyDeepLearning.EDeepLearningExecutionSettings._Engine__getter ( self)
protected

\cond

Engine with which to execute or train the neural network.

◆ _Engine__setter()

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

Engine with which to execute or train the neural network.

◆ _InferencePrecision__getter()

eVision.EasyDeepLearning.EDeepLearningInferencePrecision eVision.EasyDeepLearning.EDeepLearningExecutionSettings._InferencePrecision__getter ( self)
protected

\cond

Inference precision.

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

◆ _InferencePrecision__setter()

eVision.EasyDeepLearning.EDeepLearningExecutionSettings._InferencePrecision__setter ( self,
eVision.EasyDeepLearning.EDeepLearningInferencePrecision value )
protected

Inference precision.

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

◆ _NumAvailableDevices__getter()

int eVision.EasyDeepLearning.EDeepLearningExecutionSettings._NumAvailableDevices__getter ( self)
protected

\cond

Available devices for the current eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Engine.

◆ _NumDevices__getter()

int eVision.EasyDeepLearning.EDeepLearningExecutionSettings._NumDevices__getter ( self)
protected

\cond

Number of devices configured in this execution context.

◆ _OptimizeBatchSize__getter()

bool eVision.EasyDeepLearning.EDeepLearningExecutionSettings._OptimizeBatchSize__getter ( self)
protected

\cond

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__setter()

eVision.EasyDeepLearning.EDeepLearningExecutionSettings._OptimizeBatchSize__setter ( self,
bool value )
protected

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.

◆ 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.

◆ 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.

◆ 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.

◆ 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

◆ AvailableDevices

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.AvailableDevices = property(_AvailableDevices__getter, None)
static

\endcond

Get all available device for the current engine.

◆ BatchSize

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.BatchSize = property(_BatchSize__getter, _BatchSize__setter)
static

\endcond

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.

◆ DeviceById

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

\endcond

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

◆ DeviceByName

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

\endcond

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

◆ Devices

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Devices = property(_Devices__getter, _Devices__setter)
static

\endcond

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

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Engine = property(_Engine__getter, _Engine__setter)
static

\endcond

Engine with which to execute or train the neural network.

◆ InferencePrecision

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.InferencePrecision = property(_InferencePrecision__getter, _InferencePrecision__setter)
static

\endcond

Inference precision.

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

◆ NumAvailableDevices

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.NumAvailableDevices = property(_NumAvailableDevices__getter, None)
static

\endcond

Available devices for the current eVision.EasyDeepLearning.EDeepLearningExecutionSettings.Engine.

◆ NumDevices

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.NumDevices = property(_NumDevices__getter, None)
static

\endcond

Number of devices configured in this execution context.

◆ OptimizeBatchSize

eVision.EasyDeepLearning.EDeepLearningExecutionSettings.OptimizeBatchSize = property(_OptimizeBatchSize__getter, _OptimizeBatchSize__setter)
static

\endcond

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.