| 120 | |
| 121 | template <typename Dtype> |
| 122 | void CropLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top, |
| 123 | const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom) { |
| 124 | const Dtype* top_diff = top[0]->cpu_diff(); |
| 125 | Dtype* bottom_diff = bottom[0]->mutable_cpu_diff(); |
| 126 | |
| 127 | if (propagate_down[0]) { |
| 128 | caffe_set(bottom[0]->count(), static_cast<Dtype>(0), bottom_diff); |
| 129 | std::vector<int> indices(top[0]->num_axes(), 0); |
| 130 | crop_copy(bottom, top, offsets, indices, 0, top_diff, bottom_diff, false); |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | #ifdef CPU_ONLY |
| 135 | STUB_GPU(CropLayer); |
nothing calls this directly
no test coverage detected