concepts.dsl.tensor_state.MultidimensionalArrayInterface#

class MultidimensionalArrayInterface[source]#

Bases: object

A multi-dimensional array inferface. At a high-level, this can be interpreted as a dictionary that maps feature names (keys) to multi-diemsntional tensors (value).

Methods

clone()

Clone the multidimensional array interface.

get_feature(name)

Get the feature tensor with the given name.

items()

Get the feature name-tensor pairs.

keys()

Get the feature names.

set_feature(name, feature)

Set the feature tensor with the given name.

update_feature(other_tensor_dict)

Update the feature tensors with the given tensor dict.

values()

Get the feature tensors.

__getitem__(name)[source]#

Get the feature tensor with the given name.

Parameters:

name (str)

Return type:

TensorValue

__init__(all_feature_names=tuple())[source]#
Parameters:

all_feature_names (Iterable[str])

__new__(**kwargs)#
clone()[source]#

Clone the multidimensional array interface.

Return type:

MultidimensionalArrayInterface

get_feature(name)[source]#

Get the feature tensor with the given name.

Parameters:

name (str)

Return type:

TensorValue

items()[source]#

Get the feature name-tensor pairs.

Return type:

Iterable[Tuple[str, TensorValue]]

keys()[source]#

Get the feature names.

Return type:

Iterable[str]

set_feature(name, feature)[source]#

Set the feature tensor with the given name.

Parameters:
update_feature(other_tensor_dict)[source]#

Update the feature tensors with the given tensor dict.

Parameters:

other_tensor_dict (Mapping[str, TensorValue])

values()[source]#

Get the feature tensors.

Return type:

Iterable[TensorValue]