change threshold to 20 instead of max limit of data type

This commit is contained in:
DD
2021-06-01 09:48:43 +08:00
parent 115aa143ef
commit 91af825056

View File

@@ -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::numeric_limits<T>::max()));
const T threshold = 20.0;
for (size_t i = 0; i < count; i++)
{