_pyngraph.PartialShape

class _pyngraph.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 __int64>) -> None

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

  4. __init__(self: _pyngraph.PartialShape, arg0: std::initializer_list<ngraph::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

__init__(*args, **kwargs)

Overloaded function.

compatible(self, s)

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

dynamic(r)

get_dimension(self, index)

Get the dimension at specified index of a partial shape.

get_max_shape(self)

Returns

get_min_shape(self)

Returns

get_shape(self)

Returns

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

Attributes

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.

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