Rate this Page
★ ★ ★ ★ ★

TensorDictBase.__or__#

TensorDictBase.__or__(other: Any) → Self | bool#

OR operation over two tensordicts, for evey key.

The two tensordicts must have the same key set.

Parameters:

other (TensorDictBase, dict, or float) – the value to compare against.

Returns:

a new TensorDict instance with all tensors are boolean tensors of the same shape as the original tensors.

Every tensordict class and every tensorclass has this method. For the other methods, see Methods by task.