ngraph.PartialShape

class ngraph.PartialShape

Bases: pybind11_builtins.pybind11_object

ngraph.impl.PartialShape wraps ngraph::PartialShape

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: _pyngraph.PartialShape, arg0: List[int]) -> None

  2. __init__(self: _pyngraph.PartialShape, arg0: std::initializer_list<unsigned long>) -> None

  3. __init__(self: _pyngraph.PartialShape, arg0: List[int]) -> None

  4. __init__(self: _pyngraph.PartialShape, arg0: std::initializer_list<ov::Dimension>) -> None

  5. __init__(self: _pyngraph.PartialShape, arg0: List[_pyngraph.Dimension]) -> None

  6. __init__(self: _pyngraph.PartialShape, arg0: _pyngraph.Shape) -> None

  7. __init__(self: _pyngraph.PartialShape, arg0: _pyngraph.PartialShape) -> None

Methods

__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).

__gt__(value, /)

Return self>value.

__init__(*args, **kwargs)

Overloaded function.

__init_subclass__

This method is called when a class is subclassed.

__le__(value, /)

Return self<=value.

__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

__new__(**kwargs)

__reduce__()

Helper for pickle.

__reduce_ex__(protocol, /)

Helper for pickle.

__repr__(self)

__setattr__(name, value, /)

Implement setattr(self, name, value).

__sizeof__()

Size of object in memory, in bytes.

__str__(self)

__subclasshook__

Abstract classes can override this to customize issubclass().

compatible(self, s)

Check whether this shape is compatible with the argument, i.e., whether it is possible to merge them.

dynamic(r)

from_capsule(arg0)

get_dimension(self, index)

Get the dimension at specified index of a partial shape.

get_max_shape(self)

Returns get_max_shape Shape Get the max bounding shape.

get_min_shape(self)

Returns get_min_shape Shape Get the min bounding shape.

get_shape(self)

Returns get_shape Shape Get the unique shape.

refines(self, s)

Check whether this shape is a refinement of the argument.

relaxes(self, s)

Check whether this shape is a relaxation of the argument.

same_scheme(self, s)

Check whether this shape represents the same scheme as the argument.

to_shape(self)

Returns to_shapess Shape Get the unique shape.

Attributes

__hash__

__pybind11_module_local_v4_gcc_libstdcpp_cxxabi1014__

all_non_negative

True if all static dimensions of the tensor are non-negative, else False.

is_dynamic

False if this shape is static, else True.

is_static

True if this shape is static, else False.

rank

The rank of the shape.

__annotations__ = {}
__class__

alias of pybind11_builtins.pybind11_type

__delattr__(name, /)

Implement delattr(self, name).

__dir__()

Default dir() implementation.

__eq__(*args, **kwargs)

Overloaded function.

  1. __eq__(self: _pyngraph.PartialShape, arg0: _pyngraph.PartialShape) -> bool

  2. __eq__(self: _pyngraph.PartialShape, arg0: _pyngraph.Shape) -> bool

__format__(format_spec, /)

Default object formatter.

__ge__(value, /)

Return self>=value.

__getattribute__(name, /)

Return getattr(self, name).

__gt__(value, /)

Return self>value.

__hash__ = None
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: _pyngraph.PartialShape, arg0: List[int]) -> None

  2. __init__(self: _pyngraph.PartialShape, arg0: std::initializer_list<unsigned long>) -> None

  3. __init__(self: _pyngraph.PartialShape, arg0: List[int]) -> None

  4. __init__(self: _pyngraph.PartialShape, arg0: std::initializer_list<ov::Dimension>) -> None

  5. __init__(self: _pyngraph.PartialShape, arg0: List[_pyngraph.Dimension]) -> None

  6. __init__(self: _pyngraph.PartialShape, arg0: _pyngraph.Shape) -> None

  7. __init__(self: _pyngraph.PartialShape, arg0: _pyngraph.PartialShape) -> None

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__(value, /)

Return self<=value.

__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

__new__(**kwargs)
__pybind11_module_local_v4_gcc_libstdcpp_cxxabi1014__ = <capsule object NULL>
__reduce__()

Helper for pickle.

__reduce_ex__(protocol, /)

Helper for pickle.

__repr__(self: _pyngraph.PartialShape) str
__setattr__(name, value, /)

Implement setattr(self, name, value).

__sizeof__()

Size of object in memory, in bytes.

__str__(self: _pyngraph.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: _pyngraph.PartialShape, s: _pyngraph.PartialShape) bool

Check whether this shape is compatible with the argument, i.e., whether it is possible to merge them.

sPartialShape

The shape to be checked for compatibility with this shape.

compatiblebool

True if this shape is compatible with s, else False.

static dynamic(r: _pyngraph.Dimension = <Dimension: ?>) _pyngraph.PartialShape
static from_capsule(arg0: object) _pyngraph.PartialShape
get_dimension(self: _pyngraph.PartialShape, index: int) _pyngraph.Dimension

Get the dimension at specified index of a partial shape.

indexint

The index of dimension

get_dimensionDimension

Get the particular dimension of a partial shape.

get_max_shape(self: _pyngraph.PartialShape) _pyngraph.Shape
get_max_shapeShape

Get the max bounding shape.

get_min_shape(self: _pyngraph.PartialShape) _pyngraph.Shape
get_min_shapeShape

Get the min bounding shape.

get_shape(self: _pyngraph.PartialShape) _pyngraph.Shape
get_shapeShape

Get the unique shape.

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: _pyngraph.PartialShape, s: _pyngraph.PartialShape) bool

Check whether this shape is a refinement of the argument.

sPartialShape

The shape which is being compared against this shape.

refinesbool

True if this shape refines s, else False.

relaxes(self: _pyngraph.PartialShape, s: _pyngraph.PartialShape) bool

Check whether this shape is a relaxation of the argument.

sPartialShape

The shape which is being compared against this shape.

relaxesbool

True if this shape relaxes s, else False.

same_scheme(self: _pyngraph.PartialShape, s: _pyngraph.PartialShape) bool

Check whether this shape represents the same scheme as the argument.

sPartialShape

The shape which is being compared against this shape.

same_schemebool

True if shape represents the same scheme as s, else False.

to_shape(self: _pyngraph.PartialShape) _pyngraph.Shape
to_shapessShape

Get the unique shape.