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.
- __init__(tensor_dict=None)[source]#
- Parameters:
tensor_dict (Dict[str, TensorValue] | None)
- __new__(**kwargs)#
- get_feature(name)[source]#
Get the feature tensor with the given name.
- Parameters:
name (str)
- Return type:
- items()#
Get the feature name-tensor pairs.
- Return type:
- set_feature(name, feature)#
Set the feature tensor with the given name.
- Parameters:
name (str)
feature (TensorValue)
- 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: