MCPcopy Create free account
hub / github.com/BVLC/caffe / Backward_cpu

Method Backward_cpu

src/caffe/layers/crop_layer.cpp:122–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120
121template <typename Dtype>
122void 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
135STUB_GPU(CropLayer);

Callers

nothing calls this directly

Calls 5

caffe_setFunction · 0.85
cpu_diffMethod · 0.80
mutable_cpu_diffMethod · 0.80
countMethod · 0.80
num_axesMethod · 0.80

Tested by

no test coverage detected