Logaddexp
Source:R/gen-namespace-docs.R
, R/gen-namespace-examples.R
, R/gen-namespace.R
torch_logaddexp.Rd
Logaddexp
logaddexp(input, other, *, out=None) -> Tensor
Logarithm of the sum of exponentiations of the inputs.
Calculates pointwise
This op should be disambiguated with torch_logsumexp()
which performs a
reduction on a single tensor.
Examples
if (torch_is_installed()) {
torch_logaddexp(torch_tensor(c(-1.0)), torch_tensor(c(-1.0, -2, -3)))
torch_logaddexp(torch_tensor(c(-100.0, -200, -300)), torch_tensor(c(-1.0, -2, -3)))
torch_logaddexp(torch_tensor(c(1.0, 2000, 30000)), torch_tensor(c(-1.0, -2, -3)))
}
#> torch_tensor
#> 1.1269
#> 2000.0000
#> 30000.0000
#> [ CPUFloatType{3} ]