From 10c3b60aacef781b23b0bedebfa1e839c69d820d Mon Sep 17 00:00:00 2001 From: Georgy Krivoruchko Date: Thu, 21 Sep 2023 15:05:24 -0700 Subject: [PATCH] Updated model_creation_sample.py (#19989) Removed usage of ngraph in the sample --- .../python/model_creation_sample/model_creation_sample.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/python/model_creation_sample/model_creation_sample.py b/samples/python/model_creation_sample/model_creation_sample.py index d76d222c5f8..85815df2a7c 100755 --- a/samples/python/model_creation_sample/model_creation_sample.py +++ b/samples/python/model_creation_sample/model_creation_sample.py @@ -14,8 +14,8 @@ from openvino.runtime import op, opset1, opset8 from data import digits -def create_ngraph_function(model_path: str) -> ov.Model: - """Create a model on the fly from the source code using ngraph.""" +def create_model(model_path: str) -> ov.Model: + """Create a model on the fly from the source code using openvino.""" def shape_and_length(shape: list) -> typing.Tuple[list, int]: length = reduce(lambda x, y: x * y, shape) @@ -136,8 +136,8 @@ def main(): log.info('Creating OpenVINO Runtime Core') # ---------------------------Step 2. Read a model in OpenVINO Intermediate Representation------------------------------ - log.info(f'Loading the model using ngraph function with weights from {model_path}') - model = create_ngraph_function(model_path) + log.info(f'Loading the model using openvino with weights from {model_path}') + model = create_model(model_path) # ---------------------------Step 3. Apply preprocessing---------------------------------------------------------- # Get names of input and output blobs ppp = ov.preprocess.PrePostProcessor(model)