From 5c43f7e78cab494c706e12a905f40a0d78188aaf Mon Sep 17 00:00:00 2001 From: Sergio Date: Sun, 21 Dec 2014 14:03:49 -0800 Subject: [PATCH] Warning of fallback only the first time for cudnn_pooling_layer --- src/caffe/layers/cudnn_pooling_layer.cu | 4 ++-- src/caffe/solver.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/caffe/layers/cudnn_pooling_layer.cu b/src/caffe/layers/cudnn_pooling_layer.cu index 99c409dcc96..c2857842960 100644 --- a/src/caffe/layers/cudnn_pooling_layer.cu +++ b/src/caffe/layers/cudnn_pooling_layer.cu @@ -14,7 +14,7 @@ void CuDNNPoolingLayer::Forward_gpu(const vector*>& bottom, vector*>* top) { // Fallback to Caffe for padded pooling, max top mask. if ((this->pad_h_ > 0 || this->pad_w_ > 0) || (*top).size() > 1) { - LOG(WARNING) << "Falling back to standard Caffe for padded pooling."; + LOG_FIRST_N(WARNING,1) << "Falling back to standard Caffe for padded pooling."; return PoolingLayer::Forward_gpu(bottom, top); } @@ -33,7 +33,7 @@ void CuDNNPoolingLayer::Backward_gpu(const vector*>& top, // Fallback to Caffe for padded pooling, max top mask. if ((this->pad_h_ > 0 || this->pad_w_ > 0) || top.size() > 1) { - LOG(WARNING) << "Falling back to standard Caffe for padded pooling."; + LOG_FIRST_N(WARNING,1) << "Falling back to standard Caffe for padded pooling."; return PoolingLayer::Backward_gpu(top, propagate_down, bottom); } diff --git a/src/caffe/solver.cpp b/src/caffe/solver.cpp index 00124969886..0fd8d0f89dc 100644 --- a/src/caffe/solver.cpp +++ b/src/caffe/solver.cpp @@ -176,7 +176,7 @@ void Solver::Solve(const char* resume_file) { CHECK_GE(average_loss, 1) << "average_cost should be non-negative."; vector losses; - Dtype smoothed_loss; + Dtype smoothed_loss = 0; // For a network that is trained by the solver, no bottom or top vecs // should be given, and we will just provide dummy vecs.