From: Yangqing Jia Date: Mon, 13 Oct 2014 20:48:27 +0000 (-0700) Subject: some namespace simplification X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=94f00c076f973627cd552b4b0fde6dd534039f3a;p=platform%2Fupstream%2Fcaffe.git some namespace simplification --- diff --git a/include/caffe/common.hpp b/include/caffe/common.hpp index e7776ba..81b2e9a 100644 --- a/include/caffe/common.hpp +++ b/include/caffe/common.hpp @@ -74,6 +74,7 @@ using boost::shared_ptr; using std::fstream; using std::ios; using std::isnan; +using std::isinf; using std::iterator; using std::make_pair; using std::map; diff --git a/src/caffe/layers/exp_layer.cpp b/src/caffe/layers/exp_layer.cpp index 25da120..2c99bfc 100644 --- a/src/caffe/layers/exp_layer.cpp +++ b/src/caffe/layers/exp_layer.cpp @@ -18,9 +18,9 @@ void ExpLayer::LayerSetUp(const vector*>& bottom, // If base == -1, interpret the base as e and set log_base = 1 exactly. // Otherwise, calculate its log explicitly. const Dtype log_base = (base == Dtype(-1)) ? Dtype(1) : log(base); - CHECK(!std::isnan(log_base)) + CHECK(!isnan(log_base)) << "NaN result: log(base) = log(" << base << ") = " << log_base; - CHECK(!std::isinf(log_base)) + CHECK(!isinf(log_base)) << "Inf result: log(base) = log(" << base << ") = " << log_base; const Dtype input_scale = this->layer_param_.exp_param().scale(); const Dtype input_shift = this->layer_param_.exp_param().shift();