1
0
mirror of https://github.com/fastai/fastbook.git synced 2025-04-09 12:20:43 +00:00
This commit is contained in:
f8upd8 2024-08-01 21:25:35 +05:30 committed by GitHub
commit 9fbc222b5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1252,7 +1252,7 @@
"source": [
"#### Taking the Log\n",
"\n",
"Recall that cross entropy loss may involve the multiplication of many numbers. Multiplying lots of negative numbers together can cause problems like [numerical underflow](https://en.wikipedia.org/wiki/Arithmetic_underflow) in computers. Therefore, we want to transform these probabilities to larger values so we can perform mathematical operations on them. There is a mathematical function that does exactly this: the *logarithm* (available as `torch.log`). It is not defined for numbers less than 0, and looks like this between 0 and 1:"
"Recall that cross entropy loss may involve the multiplication of many numbers. Multiplying lots of small numbers together can cause problems like [numerical underflow](https://en.wikipedia.org/wiki/Arithmetic_underflow) in computers. Therefore, we want to transform these probabilities to larger values so we can perform mathematical operations on them. There is a mathematical function that does exactly this: the *logarithm* (available as `torch.log`). It is not defined for numbers less or equal than 0, and looks like this between 0 and 1:"
]
},
{