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:
- __new__(**kwargs)#
- get_feature(name)[source]#
Get the feature tensor with the given name.
- Parameters:
name (str)
- Return type:
- set_feature(name, feature)[source]#
Set the feature tensor with the given name.
- Parameters:
name (str)
feature (TensorValue)
- update_feature(other_tensor_dict)[source]#
Update the feature tensors with the given tensor dict.
- Parameters:
other_tensor_dict (Mapping[str, TensorValue])