Commit feeaed57 authored by Sang Ik Lee's avatar Sang Ik Lee Committed by Robert Kimball

[v0.1.0] Silee2/python binding (#674)

* Remove unsupported linker flags for Mac build.

* Restructure python binding.
Put low level direct wrapper for ngraph c++ API into ngraph/impl
Move high level API from ngraph_api to ngraph

* Move CMakeLists.txt to its own PR
parent fad85694
...@@ -21,10 +21,10 @@ onnx_protobuf = onnx.load('/path/to/model/cntk_ResNet20_CIFAR10/model.onnx') ...@@ -21,10 +21,10 @@ onnx_protobuf = onnx.load('/path/to/model/cntk_ResNet20_CIFAR10/model.onnx')
# Convert a serialized ONNX model to an ngraph model # Convert a serialized ONNX model to an ngraph model
from ngraph_onnx.onnx_importer.importer import import_onnx_model from ngraph_onnx.onnx_importer.importer import import_onnx_model
ng_model = import_onnx_model(onnx_protobuf)[0] ng_model = import_onnx_model(onnx_protobuf)[0]
# Using ngraph_api, create a callable computation object
import ngraph_api as ng # Using an ngraph runtime (CPU backend), create a callable computation
import ngraph as ng
runtime = ng.runtime(manager_name='CPU') runtime = ng.runtime(manager_name='CPU')
resnet = runtime.computation(ng_model['output'], *ng_model['inputs']) resnet = runtime.computation(ng_model['output'], *ng_model['inputs'])
......
...@@ -44,7 +44,7 @@ pip install -r test_requirements.txt ...@@ -44,7 +44,7 @@ pip install -r test_requirements.txt
Then run a test. Then run a test.
``` ```
pytest test/test_ops.py pytest test/test_ops.py
pytest test/ngraph_api/* pytest test/ngraph/*
``` ```
## Running tests with tox ## Running tests with tox
...@@ -70,7 +70,7 @@ You can run tests using only Python 3 or 2 using the `-e` (environment) switch: ...@@ -70,7 +70,7 @@ You can run tests using only Python 3 or 2 using the `-e` (environment) switch:
You can check styles in a particular code directory by specifying the path: You can check styles in a particular code directory by specifying the path:
tox ngraph_api/ tox ngraph/
In case of problems, try to recreate the virtual environments by deleting the `.tox` directory: In case of problems, try to recreate the virtual environments by deleting the `.tox` directory:
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"""Usage example for the ngraph Pythonic API.""" """Usage example for the ngraph Pythonic API."""
import numpy as np import numpy as np
import ngraph_api as ng import ngraph as ng
shape = [2, 2] shape = [2, 2]
A = ng.parameter(shape, name='A') A = ng.parameter(shape, name='A')
......
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# ****************************************************************************** # ******************************************************************************
from ngraph import Type, Function from ngraph.impl import Type, Function
from ngraph import Node from ngraph.impl import Node, Shape, AxisVector, AxisSet
from ngraph.op import Parameter, Maximum, Reshape, Dot, Broadcast from ngraph.impl.op import Parameter, Maximum, Reshape, Dot, Broadcast
from ngraph.op import Constant, Exp, Log, Sum from ngraph.impl.op import Constant, Exp, Log, Sum
from ngraph.op import Greater, Convert, Reduce from ngraph.impl.op import Greater, Convert, Reduce
from ngraph.op import OneHot from ngraph.impl.op import OneHot
from typing import List, Dict, Set from typing import List, Dict, Set
...@@ -29,13 +29,13 @@ int_element_type = Type.i32 ...@@ -29,13 +29,13 @@ int_element_type = Type.i32
bz = 53 bz = 53
lr = 0.2 lr = 0.2
Input = Parameter(float_element_type, [bz, 28, 28]) Input = Parameter(float_element_type, Shape([bz, 28, 28]))
Label = Parameter(int_element_type, [bz]) Label = Parameter(int_element_type, Shape([bz]))
LabelOneHot = Convert((OneHot(Label, [bz, 10], 1)), float_element_type) LabelOneHot = Convert((OneHot(Label, Shape([bz, 10]), 1)), float_element_type)
MaxParam1 = Parameter(float_element_type, []) MaxParam1 = Parameter(float_element_type, Shape([]))
MaxParam2 = Parameter(float_element_type, []) MaxParam2 = Parameter(float_element_type, Shape([]))
MaxFn = Function([Maximum(MaxParam1, MaxParam2)], MaxFn = Function(Maximum(MaxParam1, MaxParam2),
[MaxParam1, MaxParam2], [MaxParam1, MaxParam2],
'mnist') 'mnist')
...@@ -44,10 +44,10 @@ def make_scalar_constant(elem_type, scalar, shape=None, axis_set=None): ...@@ -44,10 +44,10 @@ def make_scalar_constant(elem_type, scalar, shape=None, axis_set=None):
# type: (int, float, List[int], Set[int]) -> float # type: (int, float, List[int], Set[int]) -> float
"""Create a Constant node for scalar value.""" """Create a Constant node for scalar value."""
if shape is None: if shape is None:
shape = [] shape = Shape([])
if axis_set is None: if axis_set is None:
axis_set = set() axis_set = AxisSet(set())
scalar_shape = [] # type: List[int] scalar_shape = Shape([]) # type: List[int]
constant_op = Constant(elem_type, scalar_shape, [scalar]) constant_op = Constant(elem_type, scalar_shape, [scalar])
constant_broadcast = Broadcast(constant_op, shape, axis_set) constant_broadcast = Broadcast(constant_op, shape, axis_set)
return constant_broadcast return constant_broadcast
...@@ -60,7 +60,7 @@ def make_float32_constant(scalar, shape=None, axis_set=None): ...@@ -60,7 +60,7 @@ def make_float32_constant(scalar, shape=None, axis_set=None):
shape = [] shape = []
if axis_set is None: if axis_set is None:
axis_set = set() axis_set = set()
return make_scalar_constant(Type.f32, scalar, shape, axis_set) return make_scalar_constant(Type.f32, scalar, Shape(shape), AxisSet(axis_set))
def make_float32_constant_like(scalar, op): # type: (float, Node) -> float def make_float32_constant_like(scalar, op): # type: (float, Node) -> float
...@@ -69,7 +69,7 @@ def make_float32_constant_like(scalar, op): # type: (float, Node) -> float ...@@ -69,7 +69,7 @@ def make_float32_constant_like(scalar, op): # type: (float, Node) -> float
shape = op.get_shape() shape = op.get_shape()
for i in range(len(shape)): for i in range(len(shape)):
v.add(i) v.add(i)
return make_float32_constant(scalar, shape, v) return make_float32_constant(scalar, Shape(shape), AxisSet(v))
def transpose(op, order): # type: (Node, List[int]) -> Node def transpose(op, order): # type: (Node, List[int]) -> Node
...@@ -78,7 +78,7 @@ def transpose(op, order): # type: (Node, List[int]) -> Node ...@@ -78,7 +78,7 @@ def transpose(op, order): # type: (Node, List[int]) -> Node
for i in range(len(order)): for i in range(len(order)):
v.append(op.get_shape()[order[i]]) v.append(op.get_shape()[order[i]])
new_shape = v new_shape = v
return Reshape(op, order, new_shape) return Reshape(op, AxisVector(order), Shape(new_shape))
def relu(op): # type: (Node) -> Node def relu(op): # type: (Node) -> Node
...@@ -87,45 +87,45 @@ def relu(op): # type: (Node) -> Node ...@@ -87,45 +87,45 @@ def relu(op): # type: (Node) -> Node
# Flatten # Flatten
X1 = Reshape(Input, [0, 1, 2], [bz, 784]) X1 = Reshape(Input, AxisVector([0, 1, 2]), Shape([bz, 784]))
# Normalize # Normalize
X2 = X1 / make_float32_constant_like(255., X1) X2 = X1 / make_float32_constant_like(255., X1)
# Affine 1 # Affine 1
W1 = Parameter(float_element_type, [784, 100]) W1 = Parameter(float_element_type, Shape([784, 100]))
b1 = Parameter(float_element_type, [100]) b1 = Parameter(float_element_type, Shape([100]))
X3 = Dot(X2, W1) + Broadcast(b1, [bz, 100], {0}) X3 = Dot(X2, W1) + Broadcast(b1, Shape([bz, 100]), AxisSet({0}))
X4 = relu(X3) X4 = relu(X3)
# Affine 2 # Affine 2
W2 = Parameter(float_element_type, [100, 10]) W2 = Parameter(float_element_type, Shape([100, 10]))
b2 = Parameter(float_element_type, [10]) b2 = Parameter(float_element_type, Shape([10]))
X5 = Dot(X4, W2) + Broadcast(b2, [bz, 10], {0}) X5 = Dot(X4, W2) + Broadcast(b2, Shape([bz, 10]), AxisSet({0}))
# Softmax # Softmax
Logits = X5 Logits = X5
Exp = Exp(Logits) Exp = Exp(Logits)
Max = Reduce(Exp, make_float32_constant(0., [], set()), MaxFn, {1}) Max = Reduce(Exp, make_float32_constant(0., [], set()), MaxFn, AxisSet({1}))
MaxBroadcast = Broadcast(Max, [bz, 10], {1}) MaxBroadcast = Broadcast(Max, Shape([bz, 10]), AxisSet({1}))
Softmax = Exp / MaxBroadcast Softmax = Exp / MaxBroadcast
# Loss # Loss
LogSoftmax = Log(Softmax) LogSoftmax = Log(Softmax)
Loss = Sum(LogSoftmax * LabelOneHot, {0, 1}) / make_float32_constant(float(bz), [], set()) Loss = Sum(LogSoftmax * LabelOneHot, AxisSet({0, 1})) / make_float32_constant(float(bz), [], set())
# Derivatives # Derivatives
dLogits = Softmax - LabelOneHot dLogits = Softmax - LabelOneHot
dX5 = dLogits dX5 = dLogits
dX4 = Dot(dX5, transpose(W2, [1, 0])) dX4 = Dot(dX5, transpose(W2, Shape([1, 0])))
dW2 = Dot(transpose(X4, [1, 0]), dX5) dW2 = Dot(transpose(X4, Shape([1, 0])), dX5)
db2 = Sum(dX5, {0}) db2 = Sum(dX5, AxisSet({0}))
dX3 = Convert((Greater(X3, make_float32_constant(0., [bz, 100], {0, 1}))), float_element_type) * dX4 dX3 = Convert((Greater(X3, make_float32_constant(0., [bz, 100], {0, 1}))), float_element_type) * dX4
dX2 = Dot(dX3, transpose(W1, [1, 0])) dX2 = Dot(dX3, transpose(W1, Shape([1, 0])))
dW1 = Dot(transpose(X2, [1, 0]), dX3) dW1 = Dot(transpose(X2, Shape([1, 0])), dX3)
db1 = Sum(dX3, {0}) db1 = Sum(dX3, AxisSet({0}))
nW1 = W1 - make_float32_constant_like(lr, dW1) * dW1 nW1 = W1 - make_float32_constant_like(lr, dW1) * dW1
nb1 = b1 - make_float32_constant_like(lr, db1) * db1 nb1 = b1 - make_float32_constant_like(lr, db1) * db1
......
# ****************************************************************************** # ******************************************************************************
# Copyright 2017-2018 Intel Corporation # Copyright 2018 Intel Corporation
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
...@@ -13,36 +13,43 @@ ...@@ -13,36 +13,43 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# ****************************************************************************** # ******************************************************************************
""" """ngraph module namespace, exposing factory functions for all ops and other classes."""
Package: ngraph
Low level wrappers for the nGraph c++ api.
"""
# flake8: noqa from ngraph.ops import absolute
from ngraph.ops import absolute as abs
from ngraph.ops import add
from ngraph.ops import avg_pool
from ngraph.ops import broadcast
from ngraph.ops import ceiling
from ngraph.ops import ceiling as ceil
from ngraph.ops import constant
from ngraph.ops import convert
from ngraph.ops import convolution
from ngraph.ops import divide
from ngraph.ops import dot
from ngraph.ops import equal
from ngraph.ops import exp
from ngraph.ops import floor
from ngraph.ops import greater
from ngraph.ops import greater_eq
from ngraph.ops import log
from ngraph.ops import less
from ngraph.ops import less_eq
from ngraph.ops import logical_not
from ngraph.ops import max
from ngraph.ops import maximum
from ngraph.ops import max_pool
from ngraph.ops import min
from ngraph.ops import minimum
from ngraph.ops import multiply
from ngraph.ops import negative
from ngraph.ops import not_equal
from ngraph.ops import parameter
from ngraph.ops import prod
from ngraph.ops import reshape
from ngraph.ops import sqrt
from ngraph.ops import subtract
from ngraph.ops import sum
from ngraph.ops import tanh
import sys from ngraph.runtime import runtime
import six
# workaround to load the libngraph.so with RTLD_GLOBAL
if six.PY3:
import os
flags = os.RTLD_NOW | os.RTLD_GLOBAL
else:
import ctypes
flags = sys.getdlopenflags() | ctypes.RTLD_GLOBAL
sys.setdlopenflags(flags)
from _pyngraph import Function
from _pyngraph import Node
from _pyngraph import NodeVector
from _pyngraph import Type
from _pyngraph import TensorViewType
from _pyngraph import Shape
from _pyngraph import Strides
from _pyngraph import CoordinateDiff
from _pyngraph import AxisSet
from _pyngraph import AxisVector
from _pyngraph import Coordinate
from _pyngraph import serialize
from _pyngraph import util
# ******************************************************************************
# Copyright 2017-2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ******************************************************************************
"""
Package: ngraph
Low level wrappers for the nGraph c++ api.
"""
# flake8: noqa
import sys
import six
# workaround to load the libngraph.so with RTLD_GLOBAL
if six.PY3:
import os
flags = os.RTLD_NOW | os.RTLD_GLOBAL
else:
import ctypes
flags = sys.getdlopenflags() | ctypes.RTLD_GLOBAL
sys.setdlopenflags(flags)
from _pyngraph import Function
from _pyngraph import Node
from _pyngraph import NodeVector
from _pyngraph import Type
from _pyngraph import TensorViewType
from _pyngraph import Shape
from _pyngraph import Strides
from _pyngraph import CoordinateDiff
from _pyngraph import AxisSet
from _pyngraph import AxisVector
from _pyngraph import Coordinate
from _pyngraph import serialize
from _pyngraph import util
...@@ -17,22 +17,22 @@ ...@@ -17,22 +17,22 @@
"""Factory functions for all ngraph ops.""" """Factory functions for all ngraph ops."""
import numpy as np import numpy as np
from ngraph import AxisSet, AxisVector, CoordinateDiff, Node, Shape, Strides from ngraph.impl import AxisSet, AxisVector, CoordinateDiff, Node, Shape, Strides
from ngraph.op import Abs, Add, AvgPool, Broadcast, Ceiling, Constant, Convert, Convolution, \ from ngraph.impl.op import Abs, Add, AvgPool, Broadcast, Ceiling, Constant, Convert, Convolution, \
Divide, Dot, Equal, Exp, Floor, Greater, GreaterEq, Less, LessEq, Log, Max, Maximum, MaxPool, \ Divide, Dot, Equal, Exp, Floor, Greater, GreaterEq, Less, LessEq, Log, Max, Maximum, MaxPool, \
Min, Minimum, Multiply, Negative, Not, NotEqual, Parameter, Product, Reshape, Sqrt, Subtract, \ Min, Minimum, Multiply, Negative, Not, NotEqual, Parameter, Product, Reshape, Sqrt, Subtract, \
Sum, Tanh Sum, Tanh
from typing import Iterable, List, Optional from typing import Iterable, List, Optional
from ngraph_api.utils.broadcasting import get_broadcast_axes from ngraph.utils.broadcasting import get_broadcast_axes
from ngraph_api.utils.decorators import nameable_op, binary_op, unary_op from ngraph.utils.decorators import nameable_op, binary_op, unary_op
from ngraph_api.utils.input_validation import assert_list_of_ints from ngraph.utils.input_validation import assert_list_of_ints
from ngraph_api.utils.reduction import get_reduction_axes from ngraph.utils.reduction import get_reduction_axes
from ngraph_api.utils.types import NumericType, NumericData, TensorShape, make_constant_node, \ from ngraph.utils.types import NumericType, NumericData, TensorShape, make_constant_node, \
as_node, NodeInput as_node, NodeInput
from ngraph_api.utils.types import get_element_type from ngraph.utils.types import get_element_type
@nameable_op @nameable_op
......
...@@ -19,11 +19,11 @@ from typing import List ...@@ -19,11 +19,11 @@ from typing import List
import numpy as np import numpy as np
from ngraph import Function, Node, serialize, TensorViewType, util from ngraph.impl import Function, Node, serialize, TensorViewType, util
from ngraph.runtime import Manager from ngraph.impl.runtime import Manager
from ngraph.op import Parameter from ngraph.impl.op import Parameter
from ngraph_api.utils.types import get_dtype, NumericData from ngraph.utils.types import get_dtype, NumericData
log = logging.getLogger(__file__) log = logging.getLogger(__file__)
...@@ -64,7 +64,7 @@ class Computation: ...@@ -64,7 +64,7 @@ class Computation:
shape = parameter.get_shape() shape = parameter.get_shape()
element_type = parameter.get_element_type() element_type = parameter.get_element_type()
self.tensor_views.append(runtime.backend.make_primary_tensor_view(element_type, shape)) self.tensor_views.append(runtime.backend.make_primary_tensor_view(element_type, shape))
self.function = Function(self.node, self.parameters, 'ngraph_API_computation') self.function = Function(self.node, self.parameters, 'ngraph_computation')
def __repr__(self): # type: () -> str def __repr__(self): # type: () -> str
params_string = ', '.join([param.name for param in self.parameters]) params_string = ', '.join([param.name for param in self.parameters])
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
import logging import logging
from typing import Optional, List from typing import Optional, List
import ngraph_api as ng import ngraph as ng
from ngraph import AxisSet, Node from ngraph.impl import AxisSet, Node
from ngraph_api.utils.types import TensorShape, get_dtype, make_constant_node, NodeInput from ngraph.utils.types import TensorShape, get_dtype, make_constant_node, NodeInput
log = logging.getLogger(__file__) log = logging.getLogger(__file__)
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
from functools import wraps from functools import wraps
from typing import Any, Callable from typing import Any, Callable
from ngraph import Node from ngraph.impl import Node
from ngraph_api.utils.types import as_node, NodeInput from ngraph.utils.types import as_node, NodeInput
from ngraph_api.utils.broadcasting import as_elementwise_compatible_nodes from ngraph.utils.broadcasting import as_elementwise_compatible_nodes
def _set_node_name(node, **kwargs): # type: (Node, **Any) -> Node def _set_node_name(node, **kwargs): # type: (Node, **Any) -> Node
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
import logging import logging
from typing import Iterable from typing import Iterable
from ngraph_api.exceptions import UserInputError from ngraph.exceptions import UserInputError
log = logging.getLogger(__file__) log = logging.getLogger(__file__)
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
# ****************************************************************************** # ******************************************************************************
from typing import Iterable, Optional from typing import Iterable, Optional
from ngraph import Node from ngraph.impl import Node
def get_reduction_axes(node, reduction_axes): def get_reduction_axes(node, reduction_axes):
......
...@@ -20,11 +20,11 @@ from typing import Union, List ...@@ -20,11 +20,11 @@ from typing import Union, List
import numpy as np import numpy as np
from ngraph import Type as NgraphType from ngraph.impl import Type as NgraphType
from ngraph import Node, Shape from ngraph.impl import Node, Shape
from ngraph.op import Constant from ngraph.impl.op import Constant
from ngraph_api.exceptions import NgraphTypeError from ngraph.exceptions import NgraphTypeError
log = logging.getLogger(__file__) log = logging.getLogger(__file__)
......
# ******************************************************************************
# Copyright 2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ******************************************************************************
"""ngraph module namespace, exposing factory functions for all ops and other classes."""
from ngraph_api.ops import absolute
from ngraph_api.ops import absolute as abs
from ngraph_api.ops import add
from ngraph_api.ops import avg_pool
from ngraph_api.ops import broadcast
from ngraph_api.ops import ceiling
from ngraph_api.ops import ceiling as ceil
from ngraph_api.ops import constant
from ngraph_api.ops import convert
from ngraph_api.ops import convolution
from ngraph_api.ops import divide
from ngraph_api.ops import dot
from ngraph_api.ops import equal
from ngraph_api.ops import exp
from ngraph_api.ops import floor
from ngraph_api.ops import greater
from ngraph_api.ops import greater_eq
from ngraph_api.ops import log
from ngraph_api.ops import less
from ngraph_api.ops import less_eq
from ngraph_api.ops import logical_not
from ngraph_api.ops import max
from ngraph_api.ops import maximum
from ngraph_api.ops import max_pool
from ngraph_api.ops import min
from ngraph_api.ops import minimum
from ngraph_api.ops import multiply
from ngraph_api.ops import negative
from ngraph_api.ops import not_equal
from ngraph_api.ops import parameter
from ngraph_api.ops import prod
from ngraph_api.ops import reshape
from ngraph_api.ops import sqrt
from ngraph_api.ops import subtract
from ngraph_api.ops import sum
from ngraph_api.ops import tanh
from ngraph_api.runtime import runtime
...@@ -24,7 +24,7 @@ namespace py = pybind11; ...@@ -24,7 +24,7 @@ namespace py = pybind11;
void regclass_pyngraph_AxisSet(py::module m) void regclass_pyngraph_AxisSet(py::module m)
{ {
py::class_<ngraph::AxisSet, std::shared_ptr<ngraph::AxisSet>> axis_set(m, "AxisSet"); py::class_<ngraph::AxisSet, std::shared_ptr<ngraph::AxisSet>> axis_set(m, "AxisSet");
axis_set.doc() = "ngraph.AxisSet wraps ngraph::AxisSet"; axis_set.doc() = "ngraph.impl.AxisSet wraps ngraph::AxisSet";
axis_set.def(py::init<const std::initializer_list<size_t>&>()); axis_set.def(py::init<const std::initializer_list<size_t>&>());
axis_set.def(py::init<const std::set<size_t>&>()); axis_set.def(py::init<const std::set<size_t>&>());
axis_set.def(py::init<const ngraph::AxisSet&>()); axis_set.def(py::init<const ngraph::AxisSet&>());
......
...@@ -25,7 +25,7 @@ void regclass_pyngraph_AxisVector(py::module m) ...@@ -25,7 +25,7 @@ void regclass_pyngraph_AxisVector(py::module m)
{ {
py::class_<ngraph::AxisVector, std::shared_ptr<ngraph::AxisVector>> axis_vector(m, py::class_<ngraph::AxisVector, std::shared_ptr<ngraph::AxisVector>> axis_vector(m,
"AxisVector"); "AxisVector");
axis_vector.doc() = "ngraph.AxisVector wraps ngraph::AxisVector"; axis_vector.doc() = "ngraph.impl.AxisVector wraps ngraph::AxisVector";
axis_vector.def(py::init<const std::initializer_list<size_t>&>()); axis_vector.def(py::init<const std::initializer_list<size_t>&>());
axis_vector.def(py::init<const std::vector<size_t>&>()); axis_vector.def(py::init<const std::vector<size_t>&>());
axis_vector.def(py::init<const ngraph::AxisVector&>()); axis_vector.def(py::init<const ngraph::AxisVector&>());
......
...@@ -24,7 +24,7 @@ namespace py = pybind11; ...@@ -24,7 +24,7 @@ namespace py = pybind11;
void regclass_pyngraph_Coordinate(py::module m) void regclass_pyngraph_Coordinate(py::module m)
{ {
py::class_<ngraph::Coordinate, std::shared_ptr<ngraph::Coordinate>> coordinate(m, "Coordinate"); py::class_<ngraph::Coordinate, std::shared_ptr<ngraph::Coordinate>> coordinate(m, "Coordinate");
coordinate.doc() = "ngraph.Coordinate wraps ngraph::Coordinate"; coordinate.doc() = "ngraph.impl.Coordinate wraps ngraph::Coordinate";
coordinate.def(py::init<const std::initializer_list<size_t>&>()); coordinate.def(py::init<const std::initializer_list<size_t>&>());
coordinate.def(py::init<const ngraph::Shape&>()); coordinate.def(py::init<const ngraph::Shape&>());
coordinate.def(py::init<const std::vector<size_t>&>()); coordinate.def(py::init<const std::vector<size_t>&>());
......
...@@ -25,7 +25,7 @@ void regclass_pyngraph_CoordinateDiff(py::module m) ...@@ -25,7 +25,7 @@ void regclass_pyngraph_CoordinateDiff(py::module m)
{ {
py::class_<ngraph::CoordinateDiff, std::shared_ptr<ngraph::CoordinateDiff>> coordinate_diff( py::class_<ngraph::CoordinateDiff, std::shared_ptr<ngraph::CoordinateDiff>> coordinate_diff(
m, "CoordinateDiff"); m, "CoordinateDiff");
coordinate_diff.doc() = "ngraph.CoordinateDiff wraps ngraph::CoordinateDiff"; coordinate_diff.doc() = "ngraph.impl.CoordinateDiff wraps ngraph::CoordinateDiff";
coordinate_diff.def(py::init<const std::initializer_list<ptrdiff_t>&>()); coordinate_diff.def(py::init<const std::initializer_list<ptrdiff_t>&>());
coordinate_diff.def(py::init<const std::vector<ptrdiff_t>&>()); coordinate_diff.def(py::init<const std::vector<ptrdiff_t>&>());
coordinate_diff.def(py::init<const ngraph::CoordinateDiff&>()); coordinate_diff.def(py::init<const ngraph::CoordinateDiff&>());
......
...@@ -27,7 +27,7 @@ namespace py = pybind11; ...@@ -27,7 +27,7 @@ namespace py = pybind11;
void regclass_pyngraph_Function(py::module m) void regclass_pyngraph_Function(py::module m)
{ {
py::class_<ngraph::Function, std::shared_ptr<ngraph::Function>> function(m, "Function"); py::class_<ngraph::Function, std::shared_ptr<ngraph::Function>> function(m, "Function");
function.doc() = "ngraph.Function wraps ngraph::Function"; function.doc() = "ngraph.impl.Function wraps ngraph::Function";
function.def(py::init<const ngraph::NodeVector&, function.def(py::init<const ngraph::NodeVector&,
const std::vector<std::shared_ptr<ngraph::op::Parameter>>&, const std::vector<std::shared_ptr<ngraph::op::Parameter>>&,
const std::string&>()); const std::string&>());
......
...@@ -29,7 +29,7 @@ namespace py = pybind11; ...@@ -29,7 +29,7 @@ namespace py = pybind11;
void regclass_pyngraph_Node(py::module m) void regclass_pyngraph_Node(py::module m)
{ {
py::class_<ngraph::Node, std::shared_ptr<ngraph::Node>> node(m, "Node"); py::class_<ngraph::Node, std::shared_ptr<ngraph::Node>> node(m, "Node");
node.doc() = "ngraph.Node wraps ngraph::Node"; node.doc() = "ngraph.impl.Node wraps ngraph::Node";
node.def("__add__", node.def("__add__",
[](const std::shared_ptr<ngraph::Node>& a, const std::shared_ptr<ngraph::Node> b) { [](const std::shared_ptr<ngraph::Node>& a, const std::shared_ptr<ngraph::Node> b) {
return a + b; return a + b;
......
...@@ -28,7 +28,7 @@ void regclass_pyngraph_NodeVector(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_NodeVector(py::module m)
{ {
py::class_<ngraph::NodeVector, std::shared_ptr<ngraph::NodeVector>> node_vector(m, py::class_<ngraph::NodeVector, std::shared_ptr<ngraph::NodeVector>> node_vector(m,
"NodeVector"); "NodeVector");
node_vector.doc() = "ngraph.NodeVector wraps ngraph::NodeVector"; node_vector.doc() = "ngraph.impl.NodeVector wraps ngraph::NodeVector";
node_vector.def(py::init<const std::initializer_list<std::shared_ptr<ngraph::Node>>&>()); node_vector.def(py::init<const std::initializer_list<std::shared_ptr<ngraph::Node>>&>());
node_vector.def(py::init<const std::vector<std::shared_ptr<ngraph::Node>>&>()); node_vector.def(py::init<const std::vector<std::shared_ptr<ngraph::Node>>&>());
node_vector.def(py::init<const ngraph::NodeVector&>()); node_vector.def(py::init<const ngraph::NodeVector&>());
......
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Abs(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Abs(py::module m)
std::shared_ptr<ngraph::op::Abs>, std::shared_ptr<ngraph::op::Abs>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
abs(m, "Abs"); abs(m, "Abs");
abs.doc() = "ngraph.op.Abs wraps ngraph::op::Abs"; abs.doc() = "ngraph.impl.op.Abs wraps ngraph::op::Abs";
abs.def(py::init<const std::shared_ptr<ngraph::Node>&>()); abs.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Acos(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Acos(py::module m)
std::shared_ptr<ngraph::op::Acos>, std::shared_ptr<ngraph::op::Acos>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
acos(m, "Acos"); acos(m, "Acos");
acos.doc() = "ngraph.op.Acos wraps ngraph::op::Acos"; acos.doc() = "ngraph.impl.op.Acos wraps ngraph::op::Acos";
acos.def(py::init<const std::shared_ptr<ngraph::Node>&>()); acos.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -28,6 +28,6 @@ void regclass_pyngraph_op_Add(py::module m) ...@@ -28,6 +28,6 @@ void regclass_pyngraph_op_Add(py::module m)
std::shared_ptr<ngraph::op::Add>, std::shared_ptr<ngraph::op::Add>,
ngraph::op::util::BinaryElementwiseArithmetic> ngraph::op::util::BinaryElementwiseArithmetic>
add(m, "Add"); add(m, "Add");
add.doc() = "ngraph.op.Add wraps ngraph::op::Add"; add.doc() = "ngraph.impl.op.Add wraps ngraph::op::Add";
add.def(py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>()); add.def(py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_AllReduce(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_AllReduce(py::module m)
std::shared_ptr<ngraph::op::AllReduce>, std::shared_ptr<ngraph::op::AllReduce>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
allreduce(m, "AllReduce"); allreduce(m, "AllReduce");
allreduce.doc() = "ngraph.op.AllReduce wraps ngraph::op::AllReduce"; allreduce.doc() = "ngraph.impl.op.AllReduce wraps ngraph::op::AllReduce";
allreduce.def(py::init<const std::shared_ptr<ngraph::Node>&>()); allreduce.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Asin(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Asin(py::module m)
std::shared_ptr<ngraph::op::Asin>, std::shared_ptr<ngraph::op::Asin>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
asin(m, "Asin"); asin(m, "Asin");
asin.doc() = "ngraph.op.Asin wraps ngraph::op::Asin"; asin.doc() = "ngraph.impl.op.Asin wraps ngraph::op::Asin";
asin.def(py::init<const std::shared_ptr<ngraph::Node>&>()); asin.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Atan(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Atan(py::module m)
std::shared_ptr<ngraph::op::Atan>, std::shared_ptr<ngraph::op::Atan>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
atan(m, "Atan"); atan(m, "Atan");
atan.doc() = "ngraph.op.Atan wraps ngraph::op::Atan"; atan.doc() = "ngraph.impl.op.Atan wraps ngraph::op::Atan";
atan.def(py::init<const std::shared_ptr<ngraph::Node>&>()); atan.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -29,7 +29,7 @@ void regclass_pyngraph_op_AvgPool(py::module m) ...@@ -29,7 +29,7 @@ void regclass_pyngraph_op_AvgPool(py::module m)
std::shared_ptr<ngraph::op::AvgPool>, std::shared_ptr<ngraph::op::AvgPool>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
avg_pool(m, "AvgPool"); avg_pool(m, "AvgPool");
avg_pool.doc() = "ngraph.op.AvgPool wraps ngraph::op::AvgPool"; avg_pool.doc() = "ngraph.impl.op.AvgPool wraps ngraph::op::AvgPool";
avg_pool.def(py::init<const std::shared_ptr<ngraph::Node>&, avg_pool.def(py::init<const std::shared_ptr<ngraph::Node>&,
const ngraph::Shape&, const ngraph::Shape&,
const ngraph::Strides&, const ngraph::Strides&,
...@@ -48,7 +48,7 @@ void regclass_pyngraph_op_AvgPoolBackprop(py::module m) ...@@ -48,7 +48,7 @@ void regclass_pyngraph_op_AvgPoolBackprop(py::module m)
std::shared_ptr<ngraph::op::AvgPoolBackprop>, std::shared_ptr<ngraph::op::AvgPoolBackprop>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
avg_pool_backprop(m, "AvgPoolBackprop"); avg_pool_backprop(m, "AvgPoolBackprop");
avg_pool_backprop.doc() = "ngraph.op.AvgPoolBackprop wraps ngraph::op::AvgPoolBackprop"; avg_pool_backprop.doc() = "ngraph.impl.op.AvgPoolBackprop wraps ngraph::op::AvgPoolBackprop";
avg_pool_backprop.def(py::init<const ngraph::Shape&, avg_pool_backprop.def(py::init<const ngraph::Shape&,
const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&,
const ngraph::Shape&, const ngraph::Shape&,
......
...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_BatchNorm(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_BatchNorm(py::module m)
std::shared_ptr<ngraph::op::BatchNorm>, std::shared_ptr<ngraph::op::BatchNorm>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
batch_norm(m, "BatchNorm"); batch_norm(m, "BatchNorm");
batch_norm.doc() = "ngraph.op.BatchNorm wraps ngraph::op::BatchNorm"; batch_norm.doc() = "ngraph.impl.op.BatchNorm wraps ngraph::op::BatchNorm";
batch_norm.def(py::init<double, batch_norm.def(py::init<double,
const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&,
const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&,
...@@ -41,7 +41,7 @@ void regclass_pyngraph_op_BatchNormBackprop(py::module m) ...@@ -41,7 +41,7 @@ void regclass_pyngraph_op_BatchNormBackprop(py::module m)
std::shared_ptr<ngraph::op::BatchNormBackprop>, std::shared_ptr<ngraph::op::BatchNormBackprop>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
batch_norm_backprop(m, "BatchNormBackprop"); batch_norm_backprop(m, "BatchNormBackprop");
batch_norm_backprop.doc() = "ngraph.op.BatchNormBackprop wraps ngraph::op::BatchNormBackprop"; batch_norm_backprop.doc() = "ngraph.impl.op.BatchNormBackprop wraps ngraph::op::BatchNormBackprop";
batch_norm_backprop.def(py::init<double, batch_norm_backprop.def(py::init<double,
const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&,
const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&,
......
...@@ -29,7 +29,7 @@ void regclass_pyngraph_op_Broadcast(py::module m) ...@@ -29,7 +29,7 @@ void regclass_pyngraph_op_Broadcast(py::module m)
std::shared_ptr<ngraph::op::Broadcast>, std::shared_ptr<ngraph::op::Broadcast>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
broadcast(m, "Broadcast"); broadcast(m, "Broadcast");
broadcast.doc() = "ngraph.op.Broadcast wraps ngraph::op::Broadcast"; broadcast.doc() = "ngraph.impl.op.Broadcast wraps ngraph::op::Broadcast";
broadcast.def(py::init<const std::shared_ptr<ngraph::Node>&, broadcast.def(py::init<const std::shared_ptr<ngraph::Node>&,
const ngraph::Shape&, const ngraph::Shape&,
const ngraph::AxisSet&>()); const ngraph::AxisSet&>());
......
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Ceiling(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Ceiling(py::module m)
std::shared_ptr<ngraph::op::Ceiling>, std::shared_ptr<ngraph::op::Ceiling>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
ceiling(m, "Ceiling"); ceiling(m, "Ceiling");
ceiling.doc() = "ngraph.op.Ceiling wraps ngraph::op::Ceiling"; ceiling.doc() = "ngraph.impl.op.Ceiling wraps ngraph::op::Ceiling";
ceiling.def(py::init<const std::shared_ptr<ngraph::Node>&>()); ceiling.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -29,6 +29,6 @@ void regclass_pyngraph_op_Concat(py::module m) ...@@ -29,6 +29,6 @@ void regclass_pyngraph_op_Concat(py::module m)
std::shared_ptr<ngraph::op::Concat>, std::shared_ptr<ngraph::op::Concat>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
concat(m, "Concat"); concat(m, "Concat");
concat.doc() = "ngraph.op.Concat wraps ngraph::op::Concat"; concat.doc() = "ngraph.impl.op.Concat wraps ngraph::op::Concat";
concat.def(py::init<const ngraph::NodeVector&, size_t>()); concat.def(py::init<const ngraph::NodeVector&, size_t>());
} }
...@@ -26,7 +26,7 @@ void regclass_pyngraph_op_Constant(py::module m) ...@@ -26,7 +26,7 @@ void regclass_pyngraph_op_Constant(py::module m)
{ {
py::class_<ngraph::op::Constant, std::shared_ptr<ngraph::op::Constant>, ngraph::Node> constant( py::class_<ngraph::op::Constant, std::shared_ptr<ngraph::op::Constant>, ngraph::Node> constant(
m, "Constant"); m, "Constant");
constant.doc() = "ngraph.op.Constant wraps ngraph::op::Constant"; constant.doc() = "ngraph.impl.op.Constant wraps ngraph::op::Constant";
constant.def( constant.def(
py::init<const ngraph::element::Type&, const ngraph::Shape&, const std::vector<char>&>()); py::init<const ngraph::element::Type&, const ngraph::Shape&, const std::vector<char>&>());
constant.def( constant.def(
......
...@@ -28,6 +28,6 @@ void regclass_pyngraph_op_Convert(py::module m) ...@@ -28,6 +28,6 @@ void regclass_pyngraph_op_Convert(py::module m)
std::shared_ptr<ngraph::op::Convert>, std::shared_ptr<ngraph::op::Convert>,
ngraph::op::util::UnaryElementwise> ngraph::op::util::UnaryElementwise>
convert(m, "Convert"); convert(m, "Convert");
convert.doc() = "ngraph.op.Convert wraps ngraph::op::Convert"; convert.doc() = "ngraph.impl.op.Convert wraps ngraph::op::Convert";
convert.def(py::init<const std::shared_ptr<ngraph::Node>&, const ngraph::element::Type&>()); convert.def(py::init<const std::shared_ptr<ngraph::Node>&, const ngraph::element::Type&>());
} }
...@@ -29,7 +29,7 @@ void regclass_pyngraph_op_Convolution(py::module m) ...@@ -29,7 +29,7 @@ void regclass_pyngraph_op_Convolution(py::module m)
std::shared_ptr<ngraph::op::Convolution>, std::shared_ptr<ngraph::op::Convolution>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
convolution(m, "Convolution"); convolution(m, "Convolution");
convolution.doc() = "ngraph.op.Convolution wraps ngraph::op::Convolution"; convolution.doc() = "ngraph.impl.op.Convolution wraps ngraph::op::Convolution";
convolution.def(py::init<const std::shared_ptr<ngraph::Node>&, convolution.def(py::init<const std::shared_ptr<ngraph::Node>&,
const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&,
const ngraph::Strides&, const ngraph::Strides&,
......
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Cos(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Cos(py::module m)
std::shared_ptr<ngraph::op::Cos>, std::shared_ptr<ngraph::op::Cos>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
cos(m, "Cos"); cos(m, "Cos");
cos.doc() = "ngraph.op.Cos wraps ngraph::op::Cos"; cos.doc() = "ngraph.impl.op.Cos wraps ngraph::op::Cos";
cos.def(py::init<const std::shared_ptr<ngraph::Node>&>()); cos.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Cosh(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Cosh(py::module m)
std::shared_ptr<ngraph::op::Cosh>, std::shared_ptr<ngraph::op::Cosh>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
cosh(m, "Cosh"); cosh(m, "Cosh");
cosh.doc() = "ngraph.op.Cosh wraps ngraph::op::Cosh"; cosh.doc() = "ngraph.impl.op.Cosh wraps ngraph::op::Cosh";
cosh.def(py::init<const std::shared_ptr<ngraph::Node>&>()); cosh.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Divide(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Divide(py::module m)
std::shared_ptr<ngraph::op::Divide>, std::shared_ptr<ngraph::op::Divide>,
ngraph::op::util::BinaryElementwiseArithmetic> ngraph::op::util::BinaryElementwiseArithmetic>
divide(m, "Divide"); divide(m, "Divide");
divide.doc() = "ngraph.op.Divide wraps ngraph::op::Divide"; divide.doc() = "ngraph.impl.op.Divide wraps ngraph::op::Divide";
divide.def( divide.def(
py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>()); py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Dot(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Dot(py::module m)
std::shared_ptr<ngraph::op::Dot>, std::shared_ptr<ngraph::op::Dot>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
dot(m, "Dot"); dot(m, "Dot");
dot.doc() = "ngraph.op.Dot wraps ngraph::op::Dot"; dot.doc() = "ngraph.impl.op.Dot wraps ngraph::op::Dot";
dot.def(py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>()); dot.def(py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>());
dot.def(py::init<const std::shared_ptr<ngraph::Node>&, dot.def(py::init<const std::shared_ptr<ngraph::Node>&,
const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&,
......
...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Equal(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Equal(py::module m)
std::shared_ptr<ngraph::op::Equal>, std::shared_ptr<ngraph::op::Equal>,
ngraph::op::util::BinaryElementwiseComparison> ngraph::op::util::BinaryElementwiseComparison>
equal(m, "Equal"); equal(m, "Equal");
equal.doc() = "ngraph.op.Equal wraps ngraph::op::Equal"; equal.doc() = "ngraph.impl.op.Equal wraps ngraph::op::Equal";
equal.def( equal.def(
py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>()); py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -28,6 +28,6 @@ void regclass_pyngraph_op_Exp(py::module m) ...@@ -28,6 +28,6 @@ void regclass_pyngraph_op_Exp(py::module m)
std::shared_ptr<ngraph::op::Exp>, std::shared_ptr<ngraph::op::Exp>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
exp(m, "Exp"); exp(m, "Exp");
exp.doc() = "ngraph.op.Exp wraps ngraph::op::Exp"; exp.doc() = "ngraph.impl.op.Exp wraps ngraph::op::Exp";
exp.def(py::init<const std::shared_ptr<ngraph::Node>&>()); exp.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Floor(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Floor(py::module m)
std::shared_ptr<ngraph::op::Floor>, std::shared_ptr<ngraph::op::Floor>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
floor(m, "Floor"); floor(m, "Floor");
floor.doc() = "ngraph.op.Floor wraps ngraph::op::Floor"; floor.doc() = "ngraph.impl.op.Floor wraps ngraph::op::Floor";
floor.def(py::init<const std::shared_ptr<ngraph::Node>&>()); floor.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -26,6 +26,6 @@ void regclass_pyngraph_op_FunctionCall(py::module m) ...@@ -26,6 +26,6 @@ void regclass_pyngraph_op_FunctionCall(py::module m)
{ {
py::class_<ngraph::op::FunctionCall, std::shared_ptr<ngraph::op::FunctionCall>, ngraph::Node> py::class_<ngraph::op::FunctionCall, std::shared_ptr<ngraph::op::FunctionCall>, ngraph::Node>
function_call(m, "FunctionCall"); function_call(m, "FunctionCall");
function_call.doc() = "ngraph.op.FunctionCall wraps ngraph::op::FunctionCall"; function_call.doc() = "ngraph.impl.op.FunctionCall wraps ngraph::op::FunctionCall";
function_call.def(py::init<std::shared_ptr<ngraph::Function>, const ngraph::NodeVector&>()); function_call.def(py::init<std::shared_ptr<ngraph::Function>, const ngraph::NodeVector&>());
} }
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_GetOutputElement(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_GetOutputElement(py::module m)
std::shared_ptr<ngraph::op::GetOutputElement>, std::shared_ptr<ngraph::op::GetOutputElement>,
ngraph::Node> ngraph::Node>
get_output_element(m, "GetOutputElement"); get_output_element(m, "GetOutputElement");
get_output_element.doc() = "ngraph.op.GetOutputElement wraps ngraph::op::GetOutputElement"; get_output_element.doc() = "ngraph.impl.op.GetOutputElement wraps ngraph::op::GetOutputElement";
get_output_element.def(py::init<const std::shared_ptr<ngraph::Node>&, size_t>()); get_output_element.def(py::init<const std::shared_ptr<ngraph::Node>&, size_t>());
} }
...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Greater(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Greater(py::module m)
std::shared_ptr<ngraph::op::Greater>, std::shared_ptr<ngraph::op::Greater>,
ngraph::op::util::BinaryElementwiseComparison> ngraph::op::util::BinaryElementwiseComparison>
greater(m, "Greater"); greater(m, "Greater");
greater.doc() = "ngraph.op.Greater wraps ngraph::op::Greater"; greater.doc() = "ngraph.impl.op.Greater wraps ngraph::op::Greater";
greater.def( greater.def(
py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>()); py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_GreaterEq(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_GreaterEq(py::module m)
std::shared_ptr<ngraph::op::GreaterEq>, std::shared_ptr<ngraph::op::GreaterEq>,
ngraph::op::util::BinaryElementwiseComparison> ngraph::op::util::BinaryElementwiseComparison>
greater_eq(m, "GreaterEq"); greater_eq(m, "GreaterEq");
greater_eq.doc() = "ngraph.op.GreaterEq wraps ngraph::op::GreaterEq"; greater_eq.doc() = "ngraph.impl.op.GreaterEq wraps ngraph::op::GreaterEq";
greater_eq.def( greater_eq.def(
py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>()); py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Less(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Less(py::module m)
std::shared_ptr<ngraph::op::Less>, std::shared_ptr<ngraph::op::Less>,
ngraph::op::util::BinaryElementwiseComparison> ngraph::op::util::BinaryElementwiseComparison>
less(m, "Less"); less(m, "Less");
less.doc() = "ngraph.op.Less wraps ngraph::op::Less"; less.doc() = "ngraph.impl.op.Less wraps ngraph::op::Less";
less.def( less.def(
py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>()); py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_LessEq(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_LessEq(py::module m)
std::shared_ptr<ngraph::op::LessEq>, std::shared_ptr<ngraph::op::LessEq>,
ngraph::op::util::BinaryElementwiseComparison> ngraph::op::util::BinaryElementwiseComparison>
less_eq(m, "LessEq"); less_eq(m, "LessEq");
less_eq.doc() = "ngraph.op.LessEq wraps ngraph::op::LessEq"; less_eq.doc() = "ngraph.impl.op.LessEq wraps ngraph::op::LessEq";
less_eq.def( less_eq.def(
py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>()); py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -28,6 +28,6 @@ void regclass_pyngraph_op_Log(py::module m) ...@@ -28,6 +28,6 @@ void regclass_pyngraph_op_Log(py::module m)
std::shared_ptr<ngraph::op::Log>, std::shared_ptr<ngraph::op::Log>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
log(m, "Log"); log(m, "Log");
log.doc() = "ngraph.op.Log wraps ngraph::op::Log"; log.doc() = "ngraph.impl.op.Log wraps ngraph::op::Log";
log.def(py::init<const std::shared_ptr<ngraph::Node>&>()); log.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Max(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Max(py::module m)
std::shared_ptr<ngraph::op::Max>, std::shared_ptr<ngraph::op::Max>,
ngraph::op::util::ArithmeticReduction> ngraph::op::util::ArithmeticReduction>
max(m, "Max"); max(m, "Max");
max.doc() = "ngraph.op.Max wraps ngraph::op::Max"; max.doc() = "ngraph.impl.op.Max wraps ngraph::op::Max";
max.def(py::init<const std::shared_ptr<ngraph::Node>&, const ngraph::AxisSet&>()); max.def(py::init<const std::shared_ptr<ngraph::Node>&, const ngraph::AxisSet&>());
} }
...@@ -46,7 +46,7 @@ void regclass_pyngraph_op_MaxPoolBackprop(py::module m) ...@@ -46,7 +46,7 @@ void regclass_pyngraph_op_MaxPoolBackprop(py::module m)
std::shared_ptr<ngraph::op::MaxPoolBackprop>, std::shared_ptr<ngraph::op::MaxPoolBackprop>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
max_pool_backprop(m, "MaxPoolBackprop"); max_pool_backprop(m, "MaxPoolBackprop");
max_pool_backprop.doc() = "ngraph.op.MaxPoolBackprop wraps ngraph::op::MaxPoolBackprop"; max_pool_backprop.doc() = "ngraph.impl.op.MaxPoolBackprop wraps ngraph::op::MaxPoolBackprop";
max_pool_backprop.def(py::init<const std::shared_ptr<ngraph::Node>&, max_pool_backprop.def(py::init<const std::shared_ptr<ngraph::Node>&,
const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&,
const ngraph::Shape&, const ngraph::Shape&,
......
...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Maximum(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Maximum(py::module m)
std::shared_ptr<ngraph::op::Maximum>, std::shared_ptr<ngraph::op::Maximum>,
ngraph::op::util::BinaryElementwiseArithmetic> ngraph::op::util::BinaryElementwiseArithmetic>
maximum(m, "Maximum"); maximum(m, "Maximum");
maximum.doc() = "ngraph.op.Maximum wraps ngraph::op::Maximum"; maximum.doc() = "ngraph.impl.op.Maximum wraps ngraph::op::Maximum";
maximum.def( maximum.def(
py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>()); py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Min(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Min(py::module m)
std::shared_ptr<ngraph::op::Min>, std::shared_ptr<ngraph::op::Min>,
ngraph::op::util::ArithmeticReduction> ngraph::op::util::ArithmeticReduction>
min(m, "Min"); min(m, "Min");
min.doc() = "ngraph.op.Min wraps ngraph::op::Min"; min.doc() = "ngraph.impl.op.Min wraps ngraph::op::Min";
min.def(py::init<const std::shared_ptr<ngraph::Node>&, const ngraph::AxisSet&>()); min.def(py::init<const std::shared_ptr<ngraph::Node>&, const ngraph::AxisSet&>());
} }
...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Minimum(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Minimum(py::module m)
std::shared_ptr<ngraph::op::Minimum>, std::shared_ptr<ngraph::op::Minimum>,
ngraph::op::util::BinaryElementwiseArithmetic> ngraph::op::util::BinaryElementwiseArithmetic>
minimum(m, "Minimum"); minimum(m, "Minimum");
minimum.doc() = "ngraph.op.Minimum wraps ngraph::op::Minimum"; minimum.doc() = "ngraph.impl.op.Minimum wraps ngraph::op::Minimum";
minimum.def( minimum.def(
py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>()); py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Multiply(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Multiply(py::module m)
std::shared_ptr<ngraph::op::Multiply>, std::shared_ptr<ngraph::op::Multiply>,
ngraph::op::util::BinaryElementwiseArithmetic> ngraph::op::util::BinaryElementwiseArithmetic>
multiply(m, "Multiply"); multiply(m, "Multiply");
multiply.doc() = "ngraph.op.Multiply wraps ngraph::op::Multiply"; multiply.doc() = "ngraph.impl.op.Multiply wraps ngraph::op::Multiply";
multiply.def( multiply.def(
py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>()); py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -28,6 +28,6 @@ void regclass_pyngraph_op_Negative(py::module m) ...@@ -28,6 +28,6 @@ void regclass_pyngraph_op_Negative(py::module m)
std::shared_ptr<ngraph::op::Negative>, std::shared_ptr<ngraph::op::Negative>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
negative(m, "Negative"); negative(m, "Negative");
negative.doc() = "ngraph.op.Negative wraps ngraph::op::Negative"; negative.doc() = "ngraph.impl.op.Negative wraps ngraph::op::Negative";
negative.def(py::init<const std::shared_ptr<ngraph::Node>&>()); negative.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -28,6 +28,6 @@ void regclass_pyngraph_op_Not(py::module m) ...@@ -28,6 +28,6 @@ void regclass_pyngraph_op_Not(py::module m)
std::shared_ptr<ngraph::op::Not>, std::shared_ptr<ngraph::op::Not>,
ngraph::op::util::UnaryElementwise> ngraph::op::util::UnaryElementwise>
logical_not(m, "Not"); logical_not(m, "Not");
logical_not.doc() = "ngraph.op.Not wraps ngraph::op::Not"; logical_not.doc() = "ngraph.impl.op.Not wraps ngraph::op::Not";
logical_not.def(py::init<const std::shared_ptr<ngraph::Node>&>()); logical_not.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_NotEqual(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_NotEqual(py::module m)
std::shared_ptr<ngraph::op::NotEqual>, std::shared_ptr<ngraph::op::NotEqual>,
ngraph::op::util::BinaryElementwiseComparison> ngraph::op::util::BinaryElementwiseComparison>
not_equal(m, "NotEqual"); not_equal(m, "NotEqual");
not_equal.doc() = "ngraph.op.NotEqual wraps ngraph::op::NotEqual"; not_equal.doc() = "ngraph.impl.op.NotEqual wraps ngraph::op::NotEqual";
not_equal.def( not_equal.def(
py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>()); py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -29,7 +29,7 @@ void regclass_pyngraph_op_OneHot(py::module m) ...@@ -29,7 +29,7 @@ void regclass_pyngraph_op_OneHot(py::module m)
std::shared_ptr<ngraph::op::OneHot>, std::shared_ptr<ngraph::op::OneHot>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
onehot(m, "OneHot"); onehot(m, "OneHot");
onehot.doc() = "ngraph.op.OneHot wraps ngraph::op::OneHot"; onehot.doc() = "ngraph.impl.op.OneHot wraps ngraph::op::OneHot";
onehot.def(py::init<const std::shared_ptr<ngraph::Node>&, const ngraph::Shape&, size_t>()); onehot.def(py::init<const std::shared_ptr<ngraph::Node>&, const ngraph::Shape&, size_t>());
onehot.def("get_one_hot_axis", &ngraph::op::OneHot::get_one_hot_axis); onehot.def("get_one_hot_axis", &ngraph::op::OneHot::get_one_hot_axis);
} }
...@@ -25,7 +25,7 @@ namespace py = pybind11; ...@@ -25,7 +25,7 @@ namespace py = pybind11;
void regclass_pyngraph_op_Op(py::module m) void regclass_pyngraph_op_Op(py::module m)
{ {
py::class_<ngraph::op::Op, std::shared_ptr<ngraph::op::Op>, ngraph::Node> op(m, "Op"); py::class_<ngraph::op::Op, std::shared_ptr<ngraph::op::Op>, ngraph::Node> op(m, "Op");
op.doc() = "ngraph.op.Op wraps ngraph::op::Op"; op.doc() = "ngraph.impl.op.Op wraps ngraph::op::Op";
op.def_property( op.def_property(
"op_annotations", &ngraph::op::Op::get_op_annotations, &ngraph::op::Op::set_op_annotations); "op_annotations", &ngraph::op::Op::get_op_annotations, &ngraph::op::Op::set_op_annotations);
} }
...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Parameter(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Parameter(py::module m)
{ {
py::class_<ngraph::op::Parameter, std::shared_ptr<ngraph::op::Parameter>, ngraph::Node> py::class_<ngraph::op::Parameter, std::shared_ptr<ngraph::op::Parameter>, ngraph::Node>
parameter(m, "Parameter"); parameter(m, "Parameter");
parameter.doc() = "ngraph.op.Parameter wraps ngraph::op::Parameter"; parameter.doc() = "ngraph.impl.op.Parameter wraps ngraph::op::Parameter";
parameter.def("__repr__", [](const ngraph::Node& self) { parameter.def("__repr__", [](const ngraph::Node& self) {
std::string class_name = py::cast(self).get_type().attr("__name__").cast<std::string>(); std::string class_name = py::cast(self).get_type().attr("__name__").cast<std::string>();
std::string shape = py::cast(self.get_shape()).attr("__str__")().cast<std::string>(); std::string shape = py::cast(self.get_shape()).attr("__str__")().cast<std::string>();
......
...@@ -27,7 +27,7 @@ void regclass_pyngraph_op_ParameterVector(py::module m) ...@@ -27,7 +27,7 @@ void regclass_pyngraph_op_ParameterVector(py::module m)
{ {
py::class_<ngraph::op::ParameterVector, std::shared_ptr<ngraph::op::ParameterVector>> py::class_<ngraph::op::ParameterVector, std::shared_ptr<ngraph::op::ParameterVector>>
parameter_vector(m, "ParameterVector"); parameter_vector(m, "ParameterVector");
parameter_vector.doc() = "ngraph.op.ParameterVector wraps ngraph::op::ParameterVector"; parameter_vector.doc() = "ngraph.impl.op.ParameterVector wraps ngraph::op::ParameterVector";
parameter_vector.def( parameter_vector.def(
py::init<const std::initializer_list<std::shared_ptr<ngraph::op::Parameter>>&>()); py::init<const std::initializer_list<std::shared_ptr<ngraph::op::Parameter>>&>());
parameter_vector.def(py::init<const std::vector<std::shared_ptr<ngraph::op::Parameter>>&>()); parameter_vector.def(py::init<const std::vector<std::shared_ptr<ngraph::op::Parameter>>&>());
......
...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Power(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Power(py::module m)
std::shared_ptr<ngraph::op::Power>, std::shared_ptr<ngraph::op::Power>,
ngraph::op::util::BinaryElementwiseArithmetic> ngraph::op::util::BinaryElementwiseArithmetic>
power(m, "Power"); power(m, "Power");
power.doc() = "ngraph.op.Power wraps ngraph::op::Power"; power.doc() = "ngraph.impl.op.Power wraps ngraph::op::Power";
power.def( power.def(
py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>()); py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Product(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Product(py::module m)
std::shared_ptr<ngraph::op::Product>, std::shared_ptr<ngraph::op::Product>,
ngraph::op::util::ArithmeticReduction> ngraph::op::util::ArithmeticReduction>
product(m, "Product"); product(m, "Product");
product.doc() = "ngraph.op.Product wraps ngraph::op::Product"; product.doc() = "ngraph.impl.op.Product wraps ngraph::op::Product";
product.def(py::init<const std::shared_ptr<ngraph::Node>&, const ngraph::AxisSet&>()); product.def(py::init<const std::shared_ptr<ngraph::Node>&, const ngraph::AxisSet&>());
} }
...@@ -30,7 +30,7 @@ void regclass_pyngraph_op_Reduce(py::module m) ...@@ -30,7 +30,7 @@ void regclass_pyngraph_op_Reduce(py::module m)
std::shared_ptr<ngraph::op::Reduce>, std::shared_ptr<ngraph::op::Reduce>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
reduce(m, "Reduce"); reduce(m, "Reduce");
reduce.doc() = "ngraph.op.Reduce wraps ngraph::op::Reduce"; reduce.doc() = "ngraph.impl.op.Reduce wraps ngraph::op::Reduce";
reduce.def(py::init<const std::shared_ptr<ngraph::Node>&, reduce.def(py::init<const std::shared_ptr<ngraph::Node>&,
const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&,
const std::shared_ptr<ngraph::Function>&, const std::shared_ptr<ngraph::Function>&,
......
...@@ -27,7 +27,7 @@ void regclass_pyngraph_op_Relu(py::module m) ...@@ -27,7 +27,7 @@ void regclass_pyngraph_op_Relu(py::module m)
std::shared_ptr<ngraph::op::Relu>, std::shared_ptr<ngraph::op::Relu>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
relu(m, "Relu"); relu(m, "Relu");
relu.doc() = "ngraph.op.Relu wraps ngraph::op::Relu"; relu.doc() = "ngraph.impl.op.Relu wraps ngraph::op::Relu";
relu.def(py::init<std::shared_ptr<ngraph::Node>&>()); relu.def(py::init<std::shared_ptr<ngraph::Node>&>());
} }
......
...@@ -29,7 +29,7 @@ void regclass_pyngraph_op_ReplaceSlice(py::module m) ...@@ -29,7 +29,7 @@ void regclass_pyngraph_op_ReplaceSlice(py::module m)
std::shared_ptr<ngraph::op::ReplaceSlice>, std::shared_ptr<ngraph::op::ReplaceSlice>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
replace_slice(m, "ReplaceSlice"); replace_slice(m, "ReplaceSlice");
replace_slice.doc() = "ngraph.op.ReplaceSlice wraps ngraph::op::ReplaceSlice"; replace_slice.doc() = "ngraph.impl.op.ReplaceSlice wraps ngraph::op::ReplaceSlice";
replace_slice.def(py::init<const std::shared_ptr<ngraph::Node>&, replace_slice.def(py::init<const std::shared_ptr<ngraph::Node>&,
const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&,
const ngraph::Coordinate&, const ngraph::Coordinate&,
......
...@@ -29,7 +29,7 @@ void regclass_pyngraph_op_Reshape(py::module m) ...@@ -29,7 +29,7 @@ void regclass_pyngraph_op_Reshape(py::module m)
std::shared_ptr<ngraph::op::Reshape>, std::shared_ptr<ngraph::op::Reshape>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
reshape(m, "Reshape"); reshape(m, "Reshape");
reshape.doc() = "ngraph.op.Reshape wraps ngraph::op::Reshape"; reshape.doc() = "ngraph.impl.op.Reshape wraps ngraph::op::Reshape";
reshape.def(py::init<const std::shared_ptr<ngraph::Node>&, reshape.def(py::init<const std::shared_ptr<ngraph::Node>&,
const ngraph::AxisVector&, const ngraph::AxisVector&,
const ngraph::Shape&>()); const ngraph::Shape&>());
......
...@@ -29,6 +29,6 @@ void regclass_pyngraph_op_Reverse(py::module m) ...@@ -29,6 +29,6 @@ void regclass_pyngraph_op_Reverse(py::module m)
std::shared_ptr<ngraph::op::Reverse>, std::shared_ptr<ngraph::op::Reverse>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
reverse(m, "Reverse"); reverse(m, "Reverse");
reverse.doc() = "ngraph.op.Reverse wraps ngraph::op::Reverse"; reverse.doc() = "ngraph.impl.op.Reverse wraps ngraph::op::Reverse";
reverse.def(py::init<const std::shared_ptr<ngraph::Node>&, const ngraph::AxisSet&>()); reverse.def(py::init<const std::shared_ptr<ngraph::Node>&, const ngraph::AxisSet&>());
} }
...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Select(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Select(py::module m)
std::shared_ptr<ngraph::op::Select>, std::shared_ptr<ngraph::op::Select>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
select(m, "Select"); select(m, "Select");
select.doc() = "ngraph.op.Select wraps ngraph::op::Select"; select.doc() = "ngraph.impl.op.Select wraps ngraph::op::Select";
select.def(py::init<const std::shared_ptr<ngraph::Node>&, select.def(py::init<const std::shared_ptr<ngraph::Node>&,
const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&,
const std::shared_ptr<ngraph::Node>&>()); const std::shared_ptr<ngraph::Node>&>());
......
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Sign(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Sign(py::module m)
std::shared_ptr<ngraph::op::Sign>, std::shared_ptr<ngraph::op::Sign>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
sign(m, "Sign"); sign(m, "Sign");
sign.doc() = "ngraph.op.Sign wraps ngraph::op::Sign"; sign.doc() = "ngraph.impl.op.Sign wraps ngraph::op::Sign";
sign.def(py::init<const std::shared_ptr<ngraph::Node>&>()); sign.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Sin(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Sin(py::module m)
std::shared_ptr<ngraph::op::Sin>, std::shared_ptr<ngraph::op::Sin>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
sin(m, "Sin"); sin(m, "Sin");
sin.doc() = "ngraph.op.Sin wraps ngraph::op::Sin"; sin.doc() = "ngraph.impl.op.Sin wraps ngraph::op::Sin";
sin.def(py::init<const std::shared_ptr<ngraph::Node>&>()); sin.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Sinh(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Sinh(py::module m)
std::shared_ptr<ngraph::op::Sinh>, std::shared_ptr<ngraph::op::Sinh>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
sinh(m, "Sinh"); sinh(m, "Sinh");
sinh.doc() = "ngraph.op.Sinh wraps ngraph::op::Sinh"; sinh.doc() = "ngraph.impl.op.Sinh wraps ngraph::op::Sinh";
sinh.def(py::init<const std::shared_ptr<ngraph::Node>&>()); sinh.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -29,7 +29,7 @@ void regclass_pyngraph_op_Slice(py::module m) ...@@ -29,7 +29,7 @@ void regclass_pyngraph_op_Slice(py::module m)
std::shared_ptr<ngraph::op::Slice>, std::shared_ptr<ngraph::op::Slice>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
slice(m, "Slice"); slice(m, "Slice");
slice.doc() = "ngraph.op.Slice wraps ngraph::op::Slice"; slice.doc() = "ngraph.impl.op.Slice wraps ngraph::op::Slice";
slice.def(py::init<const std::shared_ptr<ngraph::Node>&, slice.def(py::init<const std::shared_ptr<ngraph::Node>&,
const ngraph::Coordinate&, const ngraph::Coordinate&,
const ngraph::Coordinate&, const ngraph::Coordinate&,
......
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Softmax(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Softmax(py::module m)
std::shared_ptr<ngraph::op::Softmax>, std::shared_ptr<ngraph::op::Softmax>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
softmax(m, "Softmax"); softmax(m, "Softmax");
softmax.doc() = "ngraph.op.Softmax wraps ngraph::op::Softmax"; softmax.doc() = "ngraph.impl.op.Softmax wraps ngraph::op::Softmax";
softmax.def(py::init<const std::shared_ptr<ngraph::Node>&, const ngraph::AxisSet&>()); softmax.def(py::init<const std::shared_ptr<ngraph::Node>&, const ngraph::AxisSet&>());
} }
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Sqrt(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Sqrt(py::module m)
std::shared_ptr<ngraph::op::Sqrt>, std::shared_ptr<ngraph::op::Sqrt>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
sqrt(m, "Sqrt"); sqrt(m, "Sqrt");
sqrt.doc() = "ngraph.op.Sqrt wraps ngraph::op::Sqrt"; sqrt.doc() = "ngraph.impl.op.Sqrt wraps ngraph::op::Sqrt";
sqrt.def(py::init<const std::shared_ptr<ngraph::Node>&>()); sqrt.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Subtract(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_op_Subtract(py::module m)
std::shared_ptr<ngraph::op::Subtract>, std::shared_ptr<ngraph::op::Subtract>,
ngraph::op::util::BinaryElementwiseArithmetic> ngraph::op::util::BinaryElementwiseArithmetic>
subtract(m, "Subtract"); subtract(m, "Subtract");
subtract.doc() = "ngraph.op.Subtract wraps ngraph::op::Subtract"; subtract.doc() = "ngraph.impl.op.Subtract wraps ngraph::op::Subtract";
subtract.def( subtract.def(
py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>()); py::init<const std::shared_ptr<ngraph::Node>&, const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -29,6 +29,6 @@ void regclass_pyngraph_op_Sum(py::module m) ...@@ -29,6 +29,6 @@ void regclass_pyngraph_op_Sum(py::module m)
std::shared_ptr<ngraph::op::Sum>, std::shared_ptr<ngraph::op::Sum>,
ngraph::op::util::RequiresTensorViewArgs> ngraph::op::util::RequiresTensorViewArgs>
sum(m, "Sum"); sum(m, "Sum");
sum.doc() = "ngraph.op.Sum wraps ngraph::op::Sum"; sum.doc() = "ngraph.impl.op.Sum wraps ngraph::op::Sum";
sum.def(py::init<const std::shared_ptr<ngraph::Node>&, const ngraph::AxisSet&>()); sum.def(py::init<const std::shared_ptr<ngraph::Node>&, const ngraph::AxisSet&>());
} }
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Tan(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Tan(py::module m)
std::shared_ptr<ngraph::op::Tan>, std::shared_ptr<ngraph::op::Tan>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
tan(m, "Tan"); tan(m, "Tan");
tan.doc() = "ngraph.op.Tan wraps ngraph::op::Tan"; tan.doc() = "ngraph.impl.op.Tan wraps ngraph::op::Tan";
tan.def(py::init<const std::shared_ptr<ngraph::Node>&>()); tan.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Tanh(py::module m) ...@@ -27,6 +27,6 @@ void regclass_pyngraph_op_Tanh(py::module m)
std::shared_ptr<ngraph::op::Tanh>, std::shared_ptr<ngraph::op::Tanh>,
ngraph::op::util::UnaryElementwiseArithmetic> ngraph::op::util::UnaryElementwiseArithmetic>
tanh(m, "Tanh"); tanh(m, "Tanh");
tanh.doc() = "ngraph.op.Tanh wraps ngraph::op::Tanh"; tanh.doc() = "ngraph.impl.op.Tanh wraps ngraph::op::Tanh";
tanh.def(py::init<const std::shared_ptr<ngraph::Node>&>()); tanh.def(py::init<const std::shared_ptr<ngraph::Node>&>());
} }
...@@ -25,7 +25,7 @@ namespace py = pybind11; ...@@ -25,7 +25,7 @@ namespace py = pybind11;
void regclass_pyngraph_passes_Manager(py::module m) void regclass_pyngraph_passes_Manager(py::module m)
{ {
py::class_<ngraph::pass::Manager, std::shared_ptr<ngraph::pass::Manager>> manager(m, "Manager"); py::class_<ngraph::pass::Manager, std::shared_ptr<ngraph::pass::Manager>> manager(m, "Manager");
manager.doc() = "ngraph.pass.Manager wraps ngraph::pass::Manager"; manager.doc() = "ngraph.impl.pass.Manager wraps ngraph::pass::Manager";
manager.def("run_passes", &ngraph::pass::Manager::run_passes); manager.def("run_passes", &ngraph::pass::Manager::run_passes);
manager.def("register_pass", manager.def("register_pass",
&ngraph::pass::Manager::register_pass<ngraph::pass::ReshapeElimination>); &ngraph::pass::Manager::register_pass<ngraph::pass::ReshapeElimination>);
......
...@@ -21,6 +21,6 @@ namespace py = pybind11; ...@@ -21,6 +21,6 @@ namespace py = pybind11;
void regmodule_pyngraph_passes(py::module m) void regmodule_pyngraph_passes(py::module m)
{ {
py::module m_passes = m.def_submodule("passes", "Package ngraph.passes wraps ngraph::passes"); py::module m_passes = m.def_submodule("passes", "Package ngraph.impl.passes wraps ngraph::passes");
regclass_pyngraph_passes_Manager(m_passes); regclass_pyngraph_passes_Manager(m_passes);
} }
...@@ -21,7 +21,7 @@ namespace py = pybind11; ...@@ -21,7 +21,7 @@ namespace py = pybind11;
PYBIND11_MODULE(_pyngraph, m) PYBIND11_MODULE(_pyngraph, m)
{ {
m.doc() = "Package ngraph that wraps nGraph's namespace ngraph"; m.doc() = "Package ngraph.impl that wraps nGraph's namespace ngraph";
regclass_pyngraph_Node(m); regclass_pyngraph_Node(m);
regclass_pyngraph_NodeVector(m); regclass_pyngraph_NodeVector(m);
regclass_pyngraph_Shape(m); regclass_pyngraph_Shape(m);
...@@ -33,7 +33,7 @@ PYBIND11_MODULE(_pyngraph, m) ...@@ -33,7 +33,7 @@ PYBIND11_MODULE(_pyngraph, m)
regmodule_pyngraph_types(m); regmodule_pyngraph_types(m);
regclass_pyngraph_Function(m); regclass_pyngraph_Function(m);
regclass_pyngraph_Serializer(m); regclass_pyngraph_Serializer(m);
py::module m_op = m.def_submodule("op", "Package ngraph.op that wraps ngraph::op"); py::module m_op = m.def_submodule("op", "Package ngraph.impl.op that wraps ngraph::op");
regclass_pyngraph_op_Op(m_op); regclass_pyngraph_op_Op(m_op);
regmodule_pyngraph_op_util(m_op); regmodule_pyngraph_op_util(m_op);
regmodule_pyngraph_op(m_op); regmodule_pyngraph_op(m_op);
......
...@@ -30,7 +30,7 @@ void regclass_pyngraph_runtime_Backend(py::module m) ...@@ -30,7 +30,7 @@ void regclass_pyngraph_runtime_Backend(py::module m)
{ {
py::class_<ngraph::runtime::Backend, std::shared_ptr<ngraph::runtime::Backend>> backend( py::class_<ngraph::runtime::Backend, std::shared_ptr<ngraph::runtime::Backend>> backend(
m, "Backend"); m, "Backend");
backend.doc() = "ngraph.runtime.Backend wraps ngraph::runtime::Backend"; backend.doc() = "ngraph.impl.runtime.Backend wraps ngraph::runtime::Backend";
backend.def("make_call_frame", &ngraph::runtime::Backend::make_call_frame); backend.def("make_call_frame", &ngraph::runtime::Backend::make_call_frame);
backend.def("make_primary_tensor_view", backend.def("make_primary_tensor_view",
(std::shared_ptr<ngraph::runtime::TensorView>(ngraph::runtime::Backend::*)( (std::shared_ptr<ngraph::runtime::TensorView>(ngraph::runtime::Backend::*)(
......
...@@ -26,6 +26,6 @@ void regclass_pyngraph_runtime_CallFrame(py::module m) ...@@ -26,6 +26,6 @@ void regclass_pyngraph_runtime_CallFrame(py::module m)
{ {
py::class_<ngraph::runtime::CallFrame, std::shared_ptr<ngraph::runtime::CallFrame>> callFrame( py::class_<ngraph::runtime::CallFrame, std::shared_ptr<ngraph::runtime::CallFrame>> callFrame(
m, "CallFrame"); m, "CallFrame");
callFrame.doc() = "ngraph.runtime.CallFrame wraps ngraph::runtime::CallFrame"; callFrame.doc() = "ngraph.impl.runtime.CallFrame wraps ngraph::runtime::CallFrame";
callFrame.def("call", &ngraph::runtime::CallFrame::call); callFrame.def("call", &ngraph::runtime::CallFrame::call);
} }
...@@ -28,5 +28,5 @@ void regclass_pyngraph_runtime_ExternalFunction(py::module m) ...@@ -28,5 +28,5 @@ void regclass_pyngraph_runtime_ExternalFunction(py::module m)
std::shared_ptr<ngraph::runtime::ExternalFunction>> std::shared_ptr<ngraph::runtime::ExternalFunction>>
externalFunction(m, "ExternalFunction"); externalFunction(m, "ExternalFunction");
externalFunction.doc() = externalFunction.doc() =
"ngraph.runtime.ExternalFunction wraps ngraph::runtime::ExternalFunction"; "ngraph.impl.runtime.ExternalFunction wraps ngraph::runtime::ExternalFunction";
} }
...@@ -29,7 +29,7 @@ void regclass_pyngraph_runtime_Manager(py::module m) ...@@ -29,7 +29,7 @@ void regclass_pyngraph_runtime_Manager(py::module m)
{ {
py::class_<ngraph::runtime::Manager, std::shared_ptr<ngraph::runtime::Manager>> manager( py::class_<ngraph::runtime::Manager, std::shared_ptr<ngraph::runtime::Manager>> manager(
m, "Manager"); m, "Manager");
manager.doc() = "ngraph.runtime.Manager wraps ngraph::runtime::Manager"; manager.doc() = "ngraph.impl.runtime.Manager wraps ngraph::runtime::Manager";
manager.def_static("get", &ngraph::runtime::Manager::get); manager.def_static("get", &ngraph::runtime::Manager::get);
manager.def("compile", &ngraph::runtime::Manager::compile); manager.def("compile", &ngraph::runtime::Manager::compile);
manager.def("allocate_backend", &ngraph::runtime::Manager::allocate_backend); manager.def("allocate_backend", &ngraph::runtime::Manager::allocate_backend);
......
...@@ -22,7 +22,7 @@ namespace py = pybind11; ...@@ -22,7 +22,7 @@ namespace py = pybind11;
void regmodule_pyngraph_runtime(py::module m) void regmodule_pyngraph_runtime(py::module m)
{ {
py::module m_runtime = py::module m_runtime =
m.def_submodule("runtime", "Package ngraph.runtime wraps ngraph::runtime"); m.def_submodule("runtime", "Package ngraph.impl.runtime wraps ngraph::runtime");
regclass_pyngraph_runtime_TensorView(m_runtime); regclass_pyngraph_runtime_TensorView(m_runtime);
regclass_pyngraph_runtime_Backend(m_runtime); regclass_pyngraph_runtime_Backend(m_runtime);
regclass_pyngraph_runtime_CallFrame(m_runtime); regclass_pyngraph_runtime_CallFrame(m_runtime);
......
...@@ -26,7 +26,7 @@ void regclass_pyngraph_runtime_TensorView(py::module m) ...@@ -26,7 +26,7 @@ void regclass_pyngraph_runtime_TensorView(py::module m)
{ {
py::class_<ngraph::runtime::TensorView, std::shared_ptr<ngraph::runtime::TensorView>> py::class_<ngraph::runtime::TensorView, std::shared_ptr<ngraph::runtime::TensorView>>
tensorView(m, "TensorView"); tensorView(m, "TensorView");
tensorView.doc() = "ngraph.runtime.TensorView wraps ngraph::runtime::TensorView"; tensorView.doc() = "ngraph.impl.runtime.TensorView wraps ngraph::runtime::TensorView";
tensorView.def("write", tensorView.def("write",
(void (ngraph::runtime::TensorView::*)(const void*, size_t, size_t)) & (void (ngraph::runtime::TensorView::*)(const void*, size_t, size_t)) &
ngraph::runtime::TensorView::write); ngraph::runtime::TensorView::write);
......
...@@ -28,7 +28,7 @@ namespace py = pybind11; ...@@ -28,7 +28,7 @@ namespace py = pybind11;
void regclass_pyngraph_Shape(py::module m) void regclass_pyngraph_Shape(py::module m)
{ {
py::class_<ngraph::Shape, std::shared_ptr<ngraph::Shape>> shape(m, "Shape"); py::class_<ngraph::Shape, std::shared_ptr<ngraph::Shape>> shape(m, "Shape");
shape.doc() = "ngraph.Shape wraps ngraph::Shape"; shape.doc() = "ngraph.impl.Shape wraps ngraph::Shape";
shape.def(py::init<const std::initializer_list<size_t>&>()); shape.def(py::init<const std::initializer_list<size_t>&>());
shape.def(py::init<const std::vector<size_t>&>()); shape.def(py::init<const std::vector<size_t>&>());
shape.def(py::init<const ngraph::Shape&>()); shape.def(py::init<const ngraph::Shape&>());
......
...@@ -24,7 +24,7 @@ namespace py = pybind11; ...@@ -24,7 +24,7 @@ namespace py = pybind11;
void regclass_pyngraph_Strides(py::module m) void regclass_pyngraph_Strides(py::module m)
{ {
py::class_<ngraph::Strides, std::shared_ptr<ngraph::Strides>> strides(m, "Strides"); py::class_<ngraph::Strides, std::shared_ptr<ngraph::Strides>> strides(m, "Strides");
strides.doc() = "ngraph.Strides wraps ngraph::Strides"; strides.doc() = "ngraph.impl.Strides wraps ngraph::Strides";
strides.def(py::init<const std::initializer_list<size_t>&>()); strides.def(py::init<const std::initializer_list<size_t>&>());
strides.def(py::init<const std::vector<size_t>&>()); strides.def(py::init<const std::vector<size_t>&>());
strides.def(py::init<const ngraph::Strides&>()); strides.def(py::init<const ngraph::Strides&>());
......
...@@ -25,7 +25,7 @@ namespace py = pybind11; ...@@ -25,7 +25,7 @@ namespace py = pybind11;
void regclass_pyngraph_Type(py::module m) void regclass_pyngraph_Type(py::module m)
{ {
py::class_<ngraph::element::Type, std::shared_ptr<ngraph::element::Type>> type(m, "Type"); py::class_<ngraph::element::Type, std::shared_ptr<ngraph::element::Type>> type(m, "Type");
type.doc() = "ngraph.Type wraps ngraph::element::Type"; type.doc() = "ngraph.impl.Type wraps ngraph::element::Type";
type.attr("boolean") = ngraph::element::boolean; type.attr("boolean") = ngraph::element::boolean;
type.attr("f32") = ngraph::element::f32; type.attr("f32") = ngraph::element::f32;
type.attr("f64") = ngraph::element::f64; type.attr("f64") = ngraph::element::f64;
......
...@@ -28,7 +28,7 @@ void regclass_pyngraph_TensorViewType(py::module m) ...@@ -28,7 +28,7 @@ void regclass_pyngraph_TensorViewType(py::module m)
{ {
py::class_<ngraph::TensorViewType, std::shared_ptr<ngraph::TensorViewType>> tensorViewType( py::class_<ngraph::TensorViewType, std::shared_ptr<ngraph::TensorViewType>> tensorViewType(
m, "TensorViewType"); m, "TensorViewType");
tensorViewType.doc() = "ngraph.TensorViewType wraps ngraph::TensorViewType"; tensorViewType.doc() = "ngraph.impl.TensorViewType wraps ngraph::TensorViewType";
tensorViewType.def(py::init<const ngraph::element::Type&, const ngraph::Shape&>()); tensorViewType.def(py::init<const ngraph::element::Type&, const ngraph::Shape&>());
tensorViewType.def("get_shape", &ngraph::TensorViewType::get_shape); tensorViewType.def("get_shape", &ngraph::TensorViewType::get_shape);
} }
...@@ -27,6 +27,6 @@ void* numpy_to_c(py::array a) ...@@ -27,6 +27,6 @@ void* numpy_to_c(py::array a)
void regmodule_pyngraph_util(py::module m) void regmodule_pyngraph_util(py::module m)
{ {
py::module mod = m.def_submodule("util", "ngraph.util"); py::module mod = m.def_submodule("util", "ngraph.impl.util");
mod.def("numpy_to_c", &numpy_to_c); mod.def("numpy_to_c", &numpy_to_c);
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment