ImageEn, unit ievision

TIEVisionNNetBase.setDevice

TIEVisionNNetBase.setDevice


Declaration

procedure setDevice(backend: TIEVisionNNBackend; device: TIEVisionNNDevice); safecall;


Description

Set neural net execution backend and device (CPU or GPU).

Parameter Description
backend Backend to use
device Physical device to use


Demo

Demo  Demos\IEVision\NeuralNet\NeuralNet.dpr


Example

// neural net will be executed by CPU
nnet.setDevice(ievNNBackend_OpenCV, ievNNDevice_CPU);

// neural net will be executed by GPU (using OpenCL)
nnet.setDevice(ievNNBackend_OpenCV, ievNNDevice_OpenCL);