ngraph.Node¶
- class ngraph.Node¶
Bases:
pybind11_builtins.pybind11_object
ngraph.impl.Node wraps ngraph::Node
- __init__(*args, **kwargs)¶
Methods
__add__
(right_node[, auto_broadcast, name])Return node which applies f(x) = A+B to the input nodes element-wise.
__delattr__
(name, /)Implement delattr(self, name).
__dir__
()Default dir() implementation.
__div__
(right_node[, auto_broadcast, name])Return node which applies f(x) = A/B to the input nodes element-wise.
__eq__
(right_node[, auto_broadcast, name])Return node which checks if input nodes are equal element-wise.
__format__
(format_spec, /)Default object formatter.
__ge__
(right_node[, auto_broadcast, name])Return node which checks if left node is greater or equal to the right node element-wise.
__getattribute__
(name, /)Return getattr(self, name).
__gt__
(right_node[, auto_broadcast, name])Return node which checks if left input node is greater than the right node element-wise.
__hash__
()Return hash(self).
__init__
(*args, **kwargs)This method is called when a class is subclassed.
__le__
(right_node[, auto_broadcast, name])Return node which checks if left input node is less or equal the right node element-wise.
__lt__
(right_node[, auto_broadcast, name])Return node which checks if left input node is less than the right node element-wise.
__mul__
(right_node[, auto_broadcast, name])Return node which applies f(x) = A*B to the input nodes elementwise.
__ne__
(right_node[, auto_broadcast, name])Return node which checks if input nodes are unequal element-wise.
__new__
(**kwargs)__radd__
(right)__rdiv__
(right)Helper for pickle.
__reduce_ex__
(protocol, /)Helper for pickle.
__repr__
(self)__rmul__
(right)__rsub__
(right)__rtruediv__
(right)__setattr__
(name, value, /)Implement setattr(self, name, value).
Size of object in memory, in bytes.
__str__
()Return str(self).
__sub__
(right_node[, auto_broadcast, name])Return node which applies f(x) = A-B to the input nodes element-wise.
Abstract classes can override this to customize issubclass().
__truediv__
(right_node[, auto_broadcast, name])Return node which applies f(x) = A/B to the input nodes element-wise.
_get_attributes
(self)_set_attribute
(self, arg0, arg1)get_attributes
(self)get_element_type
(self)Checks that there is exactly one output and returns it's element type.
get_friendly_name
(self)Gets the friendly name for a node.
get_name
(self)Get the unique name of the node
get_output_element_type
(self, i)Returns the element type for output i
get_output_partial_shape
(self, i)Returns the partial shape for output i
get_output_shape
(self, i)Returns the shape for output i
get_output_size
(self)Returns the number of outputs from the node.
get_rt_info
(self)Returns PyRTMap which is a dictionary of user defined runtime info.
get_type_info
(self)get_type_name
(self)Returns Type's name from the node.
get_version
(self)Returns operation's version of the node.
input
(self, input_index)A handle to the input_index input of this node.
inputs
(self)A list containing a handle for each of this node's inputs, in order.
output
(self, output_index)A handle to the output_index output of this node.
outputs
(self)A list containing a handle for each of this node's outputs, in order.
set_argument
(self, arg0, arg1)set_arguments
(*args, **kwargs)Overloaded function.
set_attribute
(self, arg0, arg1)set_friendly_name
(self, name)Sets a friendly name for a node.
validate
(self)Attributes
- __add__(right_node: Union[_pyngraph.Node, int, float, numpy.ndarray], auto_broadcast: str = 'NUMPY', name: Optional[str] = None) _pyngraph.Node ¶
Return node which applies f(x) = A+B to the input nodes element-wise.
- __annotations__ = {}¶
- __class__¶
alias of
pybind11_builtins.pybind11_type
- __delattr__(name, /)¶
Implement delattr(self, name).
- __dir__()¶
Default dir() implementation.
- __div__(right_node: Union[_pyngraph.Node, int, float, numpy.ndarray], auto_broadcast: str = 'NUMPY', name: Optional[str] = None) _pyngraph.Node ¶
Return node which applies f(x) = A/B to the input nodes element-wise.
- Parameters
left_node – The node providing dividend data.
right_node – The node providing divisor data.
auto_broadcast – Specifies rules used for auto-broadcasting of input tensors.
name – Optional name for output node.
- Returns
The node performing element-wise division.
- __eq__(right_node: Union[_pyngraph.Node, int, float, numpy.ndarray], auto_broadcast: str = 'NUMPY', name: Optional[str] = None) _pyngraph.Node ¶
Return node which checks if input nodes are equal element-wise.
- Parameters
left_node – The first input node for equal operation.
right_node – The second input node for equal operation.
auto_broadcast – The type of broadcasting specifies rules used for auto-broadcasting of input tensors.
name – The optional name for output new node.
- Returns
The node performing element-wise equality check.
- __format__(format_spec, /)¶
Default object formatter.
- __ge__(right_node: Union[_pyngraph.Node, int, float, numpy.ndarray], auto_broadcast: str = 'NUMPY', name: Optional[str] = None) _pyngraph.Node ¶
Return node which checks if left node is greater or equal to the right node element-wise.
- Parameters
left_node – The first input node providing data.
right_node – The second input node providing data.
auto_broadcast – The type of broadcasting specifies rules used for auto-broadcasting of input tensors.
name – The optional new name for output node.
- Returns
The node performing element-wise check whether left_node is greater than or equal right_node.
- __getattribute__(name, /)¶
Return getattr(self, name).
- __gt__(right_node: Union[_pyngraph.Node, int, float, numpy.ndarray], auto_broadcast: str = 'NUMPY', name: Optional[str] = None) _pyngraph.Node ¶
Return node which checks if left input node is greater than the right node element-wise.
- Parameters
left_node – The first input node providing data.
right_node – The second input node providing data.
auto_broadcast – The type of broadcasting specifies rules used for auto-broadcasting of input tensors.
name – The optional new name for output node.
- Returns
The node performing element-wise check whether left_node is greater than right_node.
- __hash__()¶
Return hash(self).
- __init__(*args, **kwargs)¶
- __init_subclass__()¶
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
- __le__(right_node: Union[_pyngraph.Node, int, float, numpy.ndarray], auto_broadcast: str = 'NUMPY', name: Optional[str] = None) _pyngraph.Node ¶
Return node which checks if left input node is less or equal the right node element-wise.
- Parameters
left_node – The first input node providing data.
right_node – The second input node providing data.
auto_broadcast – The type of broadcasting specifies rules used for auto-broadcasting of input tensors.
name – The optional new name for output node.
- Returns
The node performing element-wise check whether left_node is less than or equal the right_node.
- __lt__(right_node: Union[_pyngraph.Node, int, float, numpy.ndarray], auto_broadcast: str = 'NUMPY', name: Optional[str] = None) _pyngraph.Node ¶
Return node which checks if left input node is less than the right node element-wise.
- Parameters
left_node – The first input node providing data.
right_node – The second input node providing data.
auto_broadcast – The type of broadcasting specifies rules used for auto-broadcasting of input tensors.
name – The optional new name for output node.
- Returns
The node performing element-wise check whether left_node is less than the right_node.
- __mul__(right_node: Union[_pyngraph.Node, int, float, numpy.ndarray], auto_broadcast: str = 'NUMPY', name: Optional[str] = None) _pyngraph.Node ¶
Return node which applies f(x) = A*B to the input nodes elementwise.
- __ne__(right_node: Union[_pyngraph.Node, int, float, numpy.ndarray], auto_broadcast: str = 'NUMPY', name: Optional[str] = None) _pyngraph.Node ¶
Return node which checks if input nodes are unequal element-wise.
- Parameters
left_node – The first input node for not-equal operation.
right_node – The second input node for not-equal operation.
auto_broadcast – The type of broadcasting specifies rules used for auto-broadcasting of input tensors.
name – The optional name for output new node.
- Returns
The node performing element-wise inequality check.
- __new__(**kwargs)¶
- __pybind11_module_local_v4_gcc_libstdcpp_cxxabi1011__ = <capsule object NULL>¶
- __radd__(right)¶
- __rdiv__(right)¶
- __reduce__()¶
Helper for pickle.
- __reduce_ex__(protocol, /)¶
Helper for pickle.
- __repr__(self: _pyngraph.Node) str ¶
- __rmul__(right)¶
- __rsub__(right)¶
- __rtruediv__(right)¶
- __setattr__(name, value, /)¶
Implement setattr(self, name, value).
- __sizeof__()¶
Size of object in memory, in bytes.
- __str__()¶
Return str(self).
- __sub__(right_node: Union[_pyngraph.Node, int, float, numpy.ndarray], auto_broadcast: str = 'NUMPY', name: Optional[str] = None) _pyngraph.Node ¶
Return node which applies f(x) = A-B to the input nodes element-wise.
- Parameters
left_node – The node providing data for left hand side of operator.
right_node – The node providing data for right hand side of operator.
auto_broadcast – The type of broadcasting that specifies mapping of input tensor axes to output shape axes. Range of values: numpy, explicit.
name – The optional name for output node.
- Returns
The new output node performing subtraction operation on both tensors element-wise.
- __subclasshook__()¶
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
- __truediv__(right_node: Union[_pyngraph.Node, int, float, numpy.ndarray], auto_broadcast: str = 'NUMPY', name: Optional[str] = None) _pyngraph.Node ¶
Return node which applies f(x) = A/B to the input nodes element-wise.
- Parameters
left_node – The node providing dividend data.
right_node – The node providing divisor data.
auto_broadcast – Specifies rules used for auto-broadcasting of input tensors.
name – Optional name for output node.
- Returns
The node performing element-wise division.
- _get_attributes(self: _pyngraph.Node) dict ¶
- _set_attribute(self: _pyngraph.Node, arg0: str, arg1: object) None ¶
- property friendly_name¶
- get_attributes(self: _pyngraph.Node) dict ¶
- get_element_type(self: _pyngraph.Node) _pyngraph.Type ¶
Checks that there is exactly one output and returns it’s element type.
- get_element_typeType
Type of the output.
- get_friendly_name(self: _pyngraph.Node) str ¶
Gets the friendly name for a node. If no friendly name has been set via set_friendly_name then the node’s unique name is returned.
- get_namestr
Friendly name of the node.
- get_name(self: _pyngraph.Node) str ¶
Get the unique name of the node
- get_namestr
Unique name of the node.
- get_output_element_type(self: _pyngraph.Node, i: int) _pyngraph.Type ¶
Returns the element type for output i
- iint
Index of the output.
- get_output_element_typeType
Type of the output i
- get_output_partial_shape(self: _pyngraph.Node, i: int) _pyngraph.PartialShape ¶
Returns the partial shape for output i
- iint
Index of the output.
- get_output_partial_shapePartialShape
PartialShape of the output i
- get_output_shape(self: _pyngraph.Node, i: int) _pyngraph.Shape ¶
Returns the shape for output i
- iint
Index of the output.
- get_output_shapeShape
Shape of the output i
- get_output_size(self: _pyngraph.Node) int ¶
Returns the number of outputs from the node.
- get_element_typeint
Number of outputs.
- get_rt_info(self: _pyngraph.Node) _pyngraph.PyRTMap ¶
Returns PyRTMap which is a dictionary of user defined runtime info.
- get_rt_infoPyRTMap
A dictionary of user defined data.
- get_type_info(self: _pyngraph.Node) ov::DiscreteTypeInfo ¶
- get_type_name(self: _pyngraph.Node) str ¶
Returns Type’s name from the node.
- get_type_namestr
String repesenting Type’s name.
- get_version(self: _pyngraph.Node) int ¶
Returns operation’s version of the node.
- get_versionint
Operation version.
- input(self: _pyngraph.Node, input_index: int) ov::Input<ov::Node> ¶
A handle to the input_index input of this node.
- input_indexint
Index of Input.
- inputInput
Input of this node.
- inputs(self: _pyngraph.Node) List[ov::Input<ov::Node>] ¶
A list containing a handle for each of this node’s inputs, in order.
- inputsList[Input]
List of node’s inputs.
- property name¶
- output(self: _pyngraph.Node, output_index: int) ov::Output<ov::Node> ¶
A handle to the output_index output of this node.
- output_indexint
Index of Output.
- inputOutput
Output of this node.
- outputs(self: _pyngraph.Node) List[ov::Output<ov::Node>] ¶
A list containing a handle for each of this node’s outputs, in order.
- inputsList[Output]
List of node’s outputs.
- property rt_info¶
- set_argument(self: _pyngraph.Node, arg0: int, arg1: ov::Output<ov::Node>) None ¶
- set_arguments(*args, **kwargs)¶
Overloaded function.
set_arguments(self: _pyngraph.Node, arg0: List[_pyngraph.Node]) -> None
set_arguments(self: _pyngraph.Node, arg0: List[ov::Output<ov::Node>]) -> None
set_arguments(self: _pyngraph.Node, arg0: List[ov::Output<ov::Node>]) -> None
- set_attribute(self: _pyngraph.Node, arg0: str, arg1: object) None ¶
- set_friendly_name(self: _pyngraph.Node, name: str) None ¶
Sets a friendly name for a node. This does not overwrite the unique name of the node and is retrieved via get_friendly_name(). Used mainly for debugging. The friendly name may be set exactly once.
- namestr
Friendly name to set.
- property shape¶
- property type_info¶
- validate(self: _pyngraph.Node) None ¶
- property version¶