democat commited on
Commit
da2ee39
·
unverified ·
1 Parent(s): d94b470

Expose OpenVINO `batch_size` similarly to TensorRT (#8437)

Browse files
Files changed (1) hide show
  1. models/common.py +1 -0
models/common.py CHANGED
@@ -366,6 +366,7 @@ class DetectMultiBackend(nn.Module):
366
  if not Path(w).is_file(): # if not *.xml
367
  w = next(Path(w).glob('*.xml')) # get *.xml file from *_openvino_model dir
368
  network = ie.read_model(model=w, weights=Path(w).with_suffix('.bin'))
 
369
  executable_network = ie.compile_model(network, device_name="CPU") # device_name="MYRIAD" for Intel NCS2
370
  output_layer = next(iter(executable_network.outputs))
371
  meta = Path(w).with_suffix('.yaml')
 
366
  if not Path(w).is_file(): # if not *.xml
367
  w = next(Path(w).glob('*.xml')) # get *.xml file from *_openvino_model dir
368
  network = ie.read_model(model=w, weights=Path(w).with_suffix('.bin'))
369
+ batch_size = network.batch_size
370
  executable_network = ie.compile_model(network, device_name="CPU") # device_name="MYRIAD" for Intel NCS2
371
  output_layer = next(iter(executable_network.outputs))
372
  meta = Path(w).with_suffix('.yaml')