Skip to content

Commit

Permalink
use std::isnan
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed May 29, 2015
1 parent 7b195c4 commit fc79d65
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/updater/sgd_updater-inl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ namespace updater {
/*! \brief used for gradient clipping and nan detection */
struct clip {
MSHADOW_XINLINE static real_t Map(real_t a, real_t b) {
using namespace std;
if (isnan(a)) return 0.0f;
if (std::isnan(a)) return 0.0f;
if (a < -b) return -b;
if (a > b) return b;
return a;
Expand Down

0 comments on commit fc79d65

Please sign in to comment.