0
Follow
3
View

Why is the value of softmax not between 0 and 1

dr_heqing 注册会员
2023-02-25 23:31

the reference answer GPT ᴼ ᴾ ᴱ ᴺ ᴬ ᴵ < br / > softmax function is used to convert the input to the probability distribution function. In the output, each element should have a value between 0 and 1. However, due to the accuracy of floating point numbers inside the computer, you may encounter situations when using the softmax function where some elements in the output have values slightly greater than 1 or slightly less than 0, but these values should be very close to 1 or 0. If the values of some elements in the output are significantly different from 0 to 1, it may be because the input values of the softmax function have a large range of differences, resulting in numerical overflow or underflow in the calculation of the exponential function, which affects the output of the softmax function. In this case, preprocessing such as normalization or scaling of input values can be attempted to alleviate numerical accuracy problems.