diff options
author | Jeff Donahue <jeff.donahue@gmail.com> | 2015-10-05 14:36:11 -0700 |
---|---|---|
committer | Jeff Donahue <jeff.donahue@gmail.com> | 2015-10-05 14:36:11 -0700 |
commit | 8ef3d630fb94abcab290a5c1403ff40c7ee36c36 (patch) | |
tree | 6fe89242040659eee3c595621a0800d8a4324330 | |
parent | 92dc4e6aae9118c3a7cc7572782ffc87534aec96 (diff) | |
parent | 64f948a6829c53031632d87f78183dd87d5d6f71 (diff) | |
download | caffeonacl-8ef3d630fb94abcab290a5c1403ff40c7ee36c36.tar.gz caffeonacl-8ef3d630fb94abcab290a5c1403ff40c7ee36c36.tar.bz2 caffeonacl-8ef3d630fb94abcab290a5c1403ff40c7ee36c36.zip |
Merge pull request #3152 from jeffdonahue/silence-backward-fix
SilenceLayer Backward bugfix (fixes #3151)
-rw-r--r-- | src/caffe/layers/silence_layer.cpp | 2 | ||||
-rw-r--r-- | src/caffe/layers/silence_layer.cu | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/caffe/layers/silence_layer.cpp b/src/caffe/layers/silence_layer.cpp index 4abf9eff..7e70ab43 100644 --- a/src/caffe/layers/silence_layer.cpp +++ b/src/caffe/layers/silence_layer.cpp @@ -12,7 +12,7 @@ void SilenceLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top, for (int i = 0; i < bottom.size(); ++i) { if (propagate_down[i]) { caffe_set(bottom[i]->count(), Dtype(0), - bottom[i]->mutable_cpu_data()); + bottom[i]->mutable_cpu_diff()); } } } diff --git a/src/caffe/layers/silence_layer.cu b/src/caffe/layers/silence_layer.cu index 8d044ee7..34faef22 100644 --- a/src/caffe/layers/silence_layer.cu +++ b/src/caffe/layers/silence_layer.cu @@ -18,7 +18,7 @@ void SilenceLayer<Dtype>::Backward_gpu(const vector<Blob<Dtype>*>& top, for (int i = 0; i < bottom.size(); ++i) { if (propagate_down[i]) { caffe_gpu_set(bottom[i]->count(), Dtype(0), - bottom[i]->mutable_gpu_data()); + bottom[i]->mutable_gpu_diff()); } } } |