module onnxrt.ops_shape.shape_container#

Inheritance diagram of mlprodict.onnxrt.ops_shape.shape_container

Short summary#

module mlprodict.onnxrt.ops_shape.shape_container

Class ShapeContainer

source on GitHub

Classes#

class

truncated documentation

ShapeContainer

Stores all infered shapes as ShapeResult. Attributes:

Methods#

method

truncated documentation

__contains__

Operator in.

__getitem__

Retrieves one shape from its name.

__init__

__len__

usual

__repr__

usual

__str__

Displays.

copy

Makes a copy.

get

Returns the value of attribute resolved_ (method resolve() must have been called first).

get_all_constraints

Gathers all constraints.

get_new_name

Returns a variable name when a dimension is not specified.

resolve

Resolves all constraints. It adds the attribute resolved_.

update

Updates one shape. Returns True if the shape was different.

Documentation#

Class ShapeContainer

source on GitHub

class mlprodict.onnxrt.ops_shape.shape_container.ShapeContainer#

Bases: object

Stores all infered shapes as ShapeResult.

Attributes:

  • shapes: dictionary { result name: ShapeResult }

  • names: some dimensions are unknown and represented as

    variables, this dictionary keeps track of them

  • names_rev: reverse dictionary of names

source on GitHub

__contains__(key)#

Operator in.

__getitem__(key)#

Retrieves one shape from its name.

__init__()#
__len__()#

usual

__repr__()#

usual

__str__()#

Displays.

source on GitHub

copy(deep=False)#

Makes a copy.

get()#

Returns the value of attribute resolved_ (method resolve() must have been called first).

source on GitHub

get_all_constraints()#

Gathers all constraints.

source on GitHub

get_new_name(name, result_name, dim)#

Returns a variable name when a dimension is not specified.

source on GitHub

resolve()#

Resolves all constraints. It adds the attribute resolved_.

source on GitHub

update(key, value)#

Updates one shape. Returns True if the shape was different.

source on GitHub