@@ -1292,27 +1292,26 @@ def create_openvino_modelfile(models_dir, model_version, max_batch, dtype, shape
12921292 )
12931293 model_version_dir = models_dir + "/" + model_name + "/" + str (model_version )
12941294
1295- in0 = ng .parameter (shape = batch_dim + shape , dtype = dtype , name = "INPUT" )
1296- start = ng .parameter (shape = batch_dim + shape , dtype = dtype , name = "START" )
1297- end = ng .parameter (shape = batch_dim + shape , dtype = dtype , name = "END" )
1298- ready = ng .parameter (shape = batch_dim + shape , dtype = dtype , name = "READY" )
1299- corrid = ng .parameter (shape = batch_dim + shape , dtype = dtype , name = "CORRID" )
1295+ in0 = ov . opset1 .parameter (shape = batch_dim + shape , dtype = dtype , name = "INPUT" )
1296+ start = ov . opset1 .parameter (shape = batch_dim + shape , dtype = dtype , name = "START" )
1297+ end = ov . opset1 .parameter (shape = batch_dim + shape , dtype = dtype , name = "END" )
1298+ ready = ov . opset1 .parameter (shape = batch_dim + shape , dtype = dtype , name = "READY" )
1299+ corrid = ov . opset1 .parameter (shape = batch_dim + shape , dtype = dtype , name = "CORRID" )
13001300
1301- tmp1 = ng .add (in0 , start )
1302- tmp2 = ng .multiply (end , corrid )
1303- tmp = ng .add (tmp1 , tmp2 )
1304- op0 = ng .multiply (tmp , ready , name = "OUTPUT" )
1301+ tmp1 = ov . opset1 .add (in0 , start )
1302+ tmp2 = ov . opset1 .multiply (end , corrid )
1303+ tmp = ov . opset1 .add (tmp1 , tmp2 )
1304+ op0 = ov . opset1 .multiply (tmp , ready , name = "OUTPUT" )
13051305
1306- function = ng .impl .Function ([op0 ], [in0 , start , end , ready , corrid ], model_name )
1307- ie_network = IENetwork (ng .impl .Function .to_capsule (function ))
1306+ model = ov .Model ([op0 ], [in0 , start , end , ready , corrid ], model_name )
13081307
13091308 try :
13101309 os .makedirs (model_version_dir )
13111310 except OSError as ex :
13121311 pass # ignore existing dir
13131312
1314- ie_network .serialize (
1315- model_version_dir + "/model.xml" , model_version_dir + "/model.bin"
1313+ ov .serialize (
1314+ model , model_version_dir + "/model.xml" , model_version_dir + "/model.bin"
13161315 )
13171316
13181317
@@ -1560,8 +1559,7 @@ def create_models(models_dir, dtype, shape, no_batch=True):
15601559 import torch
15611560 from torch import nn
15621561 if FLAGS .openvino :
1563- from openvino .inference_engine import IENetwork
1564- import ngraph as ng
1562+ import openvino .runtime as ov
15651563
15661564 import test_util as tu
15671565
0 commit comments