Skip to content

Commit

Permalink
Warning of fallback only the first time for cudnn_pooling_layer
Browse files Browse the repository at this point in the history
  • Loading branch information
sguada committed Dec 22, 2014
1 parent 3e167c1 commit 5c43f7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/caffe/layers/cudnn_pooling_layer.cu
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ void CuDNNPoolingLayer<Dtype>::Forward_gpu(const vector<Blob<Dtype>*>& bottom,
vector<Blob<Dtype>*>* 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<Dtype>::Forward_gpu(bottom, top);
}

Expand All @@ -33,7 +33,7 @@ void CuDNNPoolingLayer<Dtype>::Backward_gpu(const vector<Blob<Dtype>*>& 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<Dtype>::Backward_gpu(top, propagate_down, bottom);
}

Expand Down
2 changes: 1 addition & 1 deletion src/caffe/solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ void Solver<Dtype>::Solve(const char* resume_file) {
CHECK_GE(average_loss, 1) << "average_cost should be non-negative.";

vector<Dtype> 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.
Expand Down

0 comments on commit 5c43f7e

Please sign in to comment.