concepts.dsl.tensor_state.TensorValueDict#

class TensorValueDict[source]#

Bases: MultidimensionalArrayInterface

Basic tensor dict implementation.

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)#

Get the feature tensor with the given name.

Parameters:

name (str) –

Return type:

TensorValue

__init__(tensor_dict=None)[source]#
Parameters:

tensor_dict (Dict[str, TensorValue] | None) –

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

Clone the multidimensional array interface.

Return type:

TensorValueDict

get_feature(name)[source]#

Get the feature tensor with the given name.

Parameters:

name (str) –

Return type:

TensorValue

items()#

Get the feature name-tensor pairs.

Return type:

Iterable[Tuple[str, TensorValue]]

keys()#

Get the feature names.

Return type:

Iterable[str]

set_feature(name, feature)#

Set the feature tensor with the given name.

Parameters:
update_feature(other_tensor_dict)#

Update the feature tensors with the given tensor dict.

Parameters:

other_tensor_dict (Mapping[str, TensorValue]) –

values()#

Get the feature tensors.

Return type:

Iterable[TensorValue]