summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c93f16e)
raw | patch | inline | side by side (parent: c93f16e)
author | Yangqing Jia <jiayq84@gmail.com> | |
Sat, 21 Sep 2013 00:10:52 +0000 (17:10 -0700) | ||
committer | Yangqing Jia <jiayq84@gmail.com> | |
Sat, 21 Sep 2013 00:10:52 +0000 (17:10 -0700) |
src/caffeine/test/test_gradient_check_util.hpp | patch | blob | history | |
src/caffeine/util/im2col.cu | patch | blob | history |
diff --git a/src/caffeine/test/test_gradient_check_util.hpp b/src/caffeine/test/test_gradient_check_util.hpp
index 334a3ee8c01e13ba302c080c211d0c009b73fbb4..6b7733693ac0153c2ca31e37cb4ac6f3b76758fa 100644 (file)
blobs_to_check.push_back(bottom[check_bottom]);
}
// go through the bottom and parameter blobs
- LOG(ERROR) << "Checking " << blobs_to_check.size() << " blobs.";
+ //LOG(ERROR) << "Checking " << blobs_to_check.size() << " blobs.";
for (int blobid = 0; blobid < blobs_to_check.size(); ++blobid) {
Blob<Dtype>* current_blob = blobs_to_check[blobid];
- LOG(ERROR) << "Blob " << blobid << ": checking " << current_blob->count()
- << " parameters.";
+ //LOG(ERROR) << "Blob " << blobid << ": checking " << current_blob->count()
+ // << " parameters.";
// go through the values
for (int feat_id = 0; feat_id < current_blob->count(); ++feat_id) {
// First, obtain the original data
index 11cba4ae24cd4003e2544f180f548f2fdf80bc71..03c1dcab717aa73aabec2406d31e1bbff642f86a 100644 (file)
int w_col_end = min(w / stride + 1, width_col);
int h_col_start = (h < ksize) ? 0 : (h - ksize) / stride + 1;
int h_col_end = min(h / stride + 1, height_col);
- int col_offset = c * ksize * ksize + h * ksize + w;
for (int h_col = h_col_start; h_col < h_col_end; ++h_col) {
for (int w_col = w_col_start; w_col < w_col_end; ++w_col) {
- //// the col location: [c * width * height + h_out, w_out]
- //int c_col = c * ksize * ksize + (h - h_col * stride) * ksize + (w - w_col * stride);
- //data_im[index] += data_col[(c_col * height_col + h_col) * width_col + w_col];
- data_im[index] +=
- data_col[col_offset - (h_col * ksize + w_col) * stride];
+ // the col location: [c * width * height + h_out, w_out]
+ int c_col = c * ksize * ksize + (h - h_col * stride) * ksize + (w - w_col * stride);
+ data_im[index] += data_col[(c_col * height_col + h_col) * width_col + w_col];
}
}
}