openvino.runtime.PartialShape#
- class openvino.runtime.PartialShape#
Bases:
pybind11_object
openvino.runtime.PartialShape wraps ov::PartialShape
- __init__(*args, **kwargs)#
Overloaded function.
__init__(self: openvino._pyopenvino.PartialShape, arg0: openvino._pyopenvino.Shape) -> None
__init__(self: openvino._pyopenvino.PartialShape, arg0: openvino._pyopenvino.PartialShape) -> None
__init__(self: openvino._pyopenvino.PartialShape, arg0: list) -> None
__init__(self: openvino._pyopenvino.PartialShape, arg0: tuple) -> None
__init__(self: openvino._pyopenvino.PartialShape, shape: str) -> None
Methods
__copy__
(self)__deepcopy__
(self, arg0)memo
__delattr__
(name, /)Implement delattr(self, name).
__dir__
()Default dir() implementation.
__eq__
(*args, **kwargs)Overloaded function.
__format__
(format_spec, /)Default object formatter.
__ge__
(value, /)Return self>=value.
__getattribute__
(name, /)Return getattr(self, name).
__getitem__
(*args, **kwargs)Overloaded function.
__gt__
(value, /)Return self>value.
__init__
(*args, **kwargs)Overloaded function.
This method is called when a class is subclassed.
__iter__
(self)__le__
(value, /)Return self<=value.
__len__
(self)__lt__
(value, /)Return self<value.
__ne__
(value, /)Return self!=value.
__new__
(**kwargs)Helper for pickle.
__reduce_ex__
(protocol, /)Helper for pickle.
__repr__
(self)__setattr__
(name, value, /)Implement setattr(self, name, value).
__setitem__
(*args, **kwargs)Overloaded function.
Size of object in memory, in bytes.
__str__
(self)Abstract classes can override this to customize issubclass().
compatible
(self, shape)Check whether this shape is compatible with the argument, i.e., whether it is possible to merge them.
dynamic
(*args, **kwargs)Overloaded function.
get_dimension
(self, index)Get the dimension at specified index of a partial shape.
get_max_shape
(self)- return:
Get the max bounding shape.
get_min_shape
(self)- return:
Get the min bounding shape.
get_shape
(self)- return:
Get the unique shape.
refines
(self, shape)Check whether this shape is a refinement of the argument.
relaxes
(self, shape)Check whether this shape is a relaxation of the argument.
same_scheme
(self, shape)Check whether this shape represents the same scheme as the argument.
to_shape
(self)- return:
Get the unique shape.
to_string
(self)Attributes
True if all static dimensions of the tensor are non-negative, else False.
False if this shape is static, else True.
True if this shape is static, else False.
The rank of the shape.
- __class__#
alias of
pybind11_type
- __copy__(self: openvino._pyopenvino.PartialShape) openvino._pyopenvino.PartialShape #
- __deepcopy__(self: openvino._pyopenvino.PartialShape, arg0: dict) openvino._pyopenvino.PartialShape #
memo
- __delattr__(name, /)#
Implement delattr(self, name).
- __dir__()#
Default dir() implementation.
- __eq__(*args, **kwargs)#
Overloaded function.
__eq__(self: openvino._pyopenvino.PartialShape, arg0: openvino._pyopenvino.PartialShape) -> bool
__eq__(self: openvino._pyopenvino.PartialShape, arg0: openvino._pyopenvino.Shape) -> bool
__eq__(self: openvino._pyopenvino.PartialShape, arg0: tuple) -> bool
__eq__(self: openvino._pyopenvino.PartialShape, arg0: list) -> bool
- __format__(format_spec, /)#
Default object formatter.
- __ge__(value, /)#
Return self>=value.
- __getattribute__(name, /)#
Return getattr(self, name).
- __getitem__(*args, **kwargs)#
Overloaded function.
__getitem__(self: openvino._pyopenvino.PartialShape, arg0: int) -> openvino._pyopenvino.Dimension
__getitem__(self: openvino._pyopenvino.PartialShape, arg0: slice) -> openvino._pyopenvino.PartialShape
- __gt__(value, /)#
Return self>value.
- __hash__ = None#
- __init__(*args, **kwargs)#
Overloaded function.
__init__(self: openvino._pyopenvino.PartialShape, arg0: openvino._pyopenvino.Shape) -> None
__init__(self: openvino._pyopenvino.PartialShape, arg0: openvino._pyopenvino.PartialShape) -> None
__init__(self: openvino._pyopenvino.PartialShape, arg0: list) -> None
__init__(self: openvino._pyopenvino.PartialShape, arg0: tuple) -> None
__init__(self: openvino._pyopenvino.PartialShape, shape: str) -> None
- __init_subclass__()#
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
- __iter__(self: openvino._pyopenvino.PartialShape) Iterator[openvino._pyopenvino.Dimension] #
- __le__(value, /)#
Return self<=value.
- __len__(self: openvino._pyopenvino.PartialShape) int #
- __lt__(value, /)#
Return self<value.
- __ne__(value, /)#
Return self!=value.
- __new__(**kwargs)#
- __reduce__()#
Helper for pickle.
- __reduce_ex__(protocol, /)#
Helper for pickle.
- __repr__(self: openvino._pyopenvino.PartialShape) str #
- __setattr__(name, value, /)#
Implement setattr(self, name, value).
- __setitem__(*args, **kwargs)#
Overloaded function.
__setitem__(self: openvino._pyopenvino.PartialShape, arg0: int, arg1: int) -> None
__setitem__(self: openvino._pyopenvino.PartialShape, arg0: int, arg1: openvino._pyopenvino.Dimension) -> None
- __sizeof__()#
Size of object in memory, in bytes.
- __str__(self: openvino._pyopenvino.PartialShape) str #
- __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).
- property all_non_negative#
True if all static dimensions of the tensor are non-negative, else False.
- compatible(self: openvino._pyopenvino.PartialShape, shape: openvino._pyopenvino.PartialShape) bool #
Check whether this shape is compatible with the argument, i.e., whether it is possible to merge them.
- Parameters:
shape (openvino.runtime.PartialShape) – The shape to be checked for compatibility with this shape.
- Returns:
True if this shape is compatible with s, else False.
- Return type:
bool
- static dynamic(*args, **kwargs)#
Overloaded function.
dynamic(rank: openvino._pyopenvino.Dimension = <Dimension: ?>) -> openvino._pyopenvino.PartialShape
Construct a PartialShape with the given rank and all dimensions are dynamic.
- param rank:
The rank of the PartialShape. This is the number of dimensions in the shape.
- type rank:
openvino.Dimension
- return:
A PartialShape with the given rank (or undefined rank if not provided), and all dimensions are dynamic.
dynamic(rank: int) -> openvino._pyopenvino.PartialShape
Construct a PartialShape with the given rank and all dimensions are dynamic.
- param rank:
The rank of the PartialShape. This is the number of dimensions in the shape.
- type rank:
int
- return:
A PartialShape with the given rank, and all dimensions are dynamic.
- get_dimension(self: openvino._pyopenvino.PartialShape, index: int) openvino._pyopenvino.Dimension #
Get the dimension at specified index of a partial shape.
- Parameters:
index (int) – The index of dimension.
- Returns:
Get the particular dimension of a partial shape.
- Return type:
- get_max_shape(self: openvino._pyopenvino.PartialShape) openvino._pyopenvino.Shape #
- Returns:
Get the max bounding shape.
- Return type:
- get_min_shape(self: openvino._pyopenvino.PartialShape) openvino._pyopenvino.Shape #
- Returns:
Get the min bounding shape.
- Return type:
- get_shape(self: openvino._pyopenvino.PartialShape) openvino._pyopenvino.Shape #
- Returns:
Get the unique shape.
- Return type:
- property is_dynamic#
False if this shape is static, else True. A shape is considered static if it has static rank, and all dimensions of the shape are static.
- property is_static#
True if this shape is static, else False. A shape is considered static if it has static rank, and all dimensions of the shape are static.
- property rank#
The rank of the shape.
- refines(self: openvino._pyopenvino.PartialShape, shape: openvino._pyopenvino.PartialShape) bool #
Check whether this shape is a refinement of the argument.
- Parameters:
shape (openvino.runtime.PartialShape) – The shape which is being compared against this shape.
- Returns:
True if this shape refines s, else False.
- Return type:
bool
- relaxes(self: openvino._pyopenvino.PartialShape, shape: openvino._pyopenvino.PartialShape) bool #
Check whether this shape is a relaxation of the argument.
- Parameters:
shape (openvino.runtime.PartialShape) – The shape which is being compared against this shape.
- Returns:
True if this shape relaxes s, else False.
- Return type:
bool
- same_scheme(self: openvino._pyopenvino.PartialShape, shape: openvino._pyopenvino.PartialShape) bool #
Check whether this shape represents the same scheme as the argument.
- Parameters:
shape (openvino.runtime.PartialShape) – The shape which is being compared against this shape.
- Returns:
True if shape represents the same scheme as s, else False.
- Return type:
bool
- to_shape(self: openvino._pyopenvino.PartialShape) openvino._pyopenvino.Shape #
- Returns:
Get the unique shape.
- Return type:
- to_string(self: openvino._pyopenvino.PartialShape) str #