You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/pytorch/concepts/tensor-operations/terms/logaddexp/logaddexp.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,6 @@ Description: 'Computes the element-wise logarithm of the sum of exponentials of
4
4
Subjects:
5
5
- 'Code Foundations'
6
6
- 'Computer Science'
7
-
- 'Data Science'
8
7
Tags:
9
8
- 'Elements'
10
9
- 'Methods'
@@ -15,11 +14,11 @@ CatalogContent:
15
14
- 'paths/data-science'
16
15
---
17
16
18
-
The **`.logaddexp()`** function in PyTorch computes the point-wise value of:
17
+
The **`.logaddexp()`** function in PyTorch computes the element-wise logarithm of the sum of exponentials of two input [tensors](https://www.codecademy.com/resources/docs/pytorch/tensors). If the tensors are `x` and `y`, the mathematical formula will be:
19
18
20
19
$$\log(\exp(x) + \exp(y))$$
21
20
22
-
for two input tensors `x` and `y`. This operation is particularly useful for combining log-space values (such as log-probabilities) in a numerically stable way.
21
+
This operation is particularly useful for combining log-space values (such as log-probabilities) in a numerically stable way.
23
22
24
23
## Syntax
25
24
@@ -39,7 +38,7 @@ Returns a new tensor of the same shape as the broadcasted `input` and `other`, w
0 commit comments