Fixed Softplus ref (#5755)
This commit is contained in:
parent
b87fa84c9f
commit
a74ba7b18e
@ -28,7 +28,7 @@ The `threshold` can be calculated with the following formula where `alpha` is th
|
||||
-log(e^{10^{-\alpha}} - 1.0) < threshold < log(\beta)
|
||||
\f]
|
||||
|
||||
For example, if *T* is `fp32`, `threshold` should be `20` or if *T* is `fp16`, `threshold` should be `12`.
|
||||
For example, if *T* is `fp32`, `threshold` should be `20` or if *T* is `fp16`, `threshold` should be `11`.
|
||||
|
||||
**Attributes**: *SoftPlus* operation has no attributes.
|
||||
|
||||
|
@ -16,7 +16,7 @@ namespace ngraph
|
||||
template <typename T>
|
||||
void softplus(const T* arg, T* out, size_t count)
|
||||
{
|
||||
const T threshold = static_cast<T>(-std::log(std::exp(std::pow(10, -6)) - 1));
|
||||
const T threshold = static_cast<T>(std::log(std::numeric_limits<T>::max()));
|
||||
|
||||
for (size_t i = 0; i < count; i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user