TensorDictBase.logsumexp#
- TensorDictBase.logsumexp(dim=None, keepdim=False, *, out=None)#
Returns the log of summed exponentials of each row of the input tensordict in the given dimension
dim. The computation is numerically stabilized.If keepdim is
True, the output tensor is of the same size as input except in the dimension(s)dimwhere it is of size1. Otherwise,dimis squeezed (seesqueeze()), resulting in the output tensor having 1 (or len(dim)) fewer dimension(s).- Parameters:
- Keyword Arguments:
out (TensorDictBase, optional) – the output tensordict.
Every tensordict class and every tensorclass has this method. For the other methods, see Methods by task.