Giter Club home page Giter Club logo

Comments (1)

rkazants avatar rkazants commented on May 23, 2024

Hi @lcx1874000,

As I understand, you want to create the single layer model that contain OV Convolution and run it for inference. Here is an example how to create the single layer model with Divide operation:

import numpy as np
import openvino.runtime.opset9 as ov
from openvino.runtime import Model, Core

# create a model with TopK
x = ov.parameter([1], name="x", dtype=np.int32)
y = ov.parameter([1], name="y", dtype=np.int32)
divide = ov.divide(x, y)
model = Model([divide], [x, y], "model")

# infer it on CPU
core = Core()
compiled_model = core.compile_model(model, "CPU")
output = compiled_model.infer_new_request({0: np.array([4], dtype=np.int32), 1: np.array([-3], dtype=np.int32)})

Since you want to create with Convolution, please refer to Convolution Python documentation: https://docs.openvino.ai/2024/api/ie_python_api/_autosummary/openvino.runtime.opset14.convolution.html
Examples with convolution in test: https://github.com/openvinotoolkit/openvino/blob/master/src/bindings/python/tests/test_graph/test_convolution.py

Pay attention that we have no eager execution mode for inference.
Please elaborate your request more if I missed somenthing.

Best regards,
Roman

from openvino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.