TensorDictBase.__and__#
- TensorDictBase.__and__(other: TensorCollection | Tensor | float) Self#
Returns a new TensorDict instance with all tensors performing a logical or bitwise AND operation with the given value.
- Parameters:
other – The value to perform the AND operation with.
- Returns:
A new TensorDict instance with the same key set as the original, but with all tensors having performed a AND operation with the given value.
Every tensordict class and every tensorclass has this method. For the other methods, see Methods by task.