Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
21 Views

How to set batch size to increase performance?

Hi ,

    I'd successfully running the Openvino on CPU and FPGA , then I try to set batch size to increase peformance

    I tried -b cmmand when converting IR files using mo.py , but when loading into FPGA the messages shows "batch size is set to 1" or "... force set to 1" or some example show's " ... set to 16" (different examples, some example have more than one xml file ,like -m,-m_ag,-m_hp...)

    Could any body know how to set batch size ?

 thanks

Dee Zeng

0 Kudos
1 Reply
Highlighted
Employee
21 Views

Hi, Dee,

From your question, I guess you are referring to "interactive Face Detection Demo".

The demo utilize four DNN models to detect different things (age, head pose, emotion and landmarks) that's why you see so many different parameters. For dynamic patch size you need to set two parameter to make it works, for example if you want to have 8 batches to be processed simultaneously for age model, you need to set "-n_ag 8 -dyn_ag true".

If you are referring how to write the code, you can refer to the sample code. there is "Load" function in "detectors.cpp" which checks if "dyn_ag" set to true or not to configure the plugin with "PluginConfigParams:YES". Then use the SetBachSize function of the CNNNetwork to configure the batch size from the parameter "n_ag".

0 Kudos