torch.logaddexp2
function logaddexp2(input: Tensor, other: Tensor, options?: BinaryOptions): TensorComputes log2(2^x + 2^y) element-wise in a numerically stable way.
Parameters
inputTensor- First input tensor
otherTensor- Second input tensor
optionsBinaryOptionsoptional- Optional settings including
outparameter
Returns
Tensor– wise logaddexp2Examples
const x = torch.tensor([1.0, 2.0, 3.0]);
const y = torch.tensor([2.0, 3.0, 4.0]);
torch.logaddexp2(x, y); // numerically stable log2(2^x + 2^y)