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

Method Forward_cpu

src/caffe/layers/conv_layer.cpp:25–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24template <typename Dtype>
25void ConvolutionLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
26 const vector<Blob<Dtype>*>& top) {
27 const Dtype* weight = this->blobs_[0]->cpu_data();
28 for (int i = 0; i < bottom.size(); ++i) {
29 const Dtype* bottom_data = bottom[i]->cpu_data();
30 Dtype* top_data = top[i]->mutable_cpu_data();
31 for (int n = 0; n < this->num_; ++n) {
32 this->forward_cpu_gemm(bottom_data + n * this->bottom_dim_, weight,
33 top_data + n * this->top_dim_);
34 if (this->bias_term_) {
35 const Dtype* bias = this->blobs_[1]->cpu_data();
36 this->forward_cpu_bias(top_data + n * this->top_dim_, bias);
37 }
38 }
39 }
40}
41
42template <typename Dtype>
43void ConvolutionLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top,

Callers

nothing calls this directly

Calls 5

forward_cpu_gemmMethod · 0.80
forward_cpu_biasMethod · 0.80
cpu_dataMethod · 0.45
sizeMethod · 0.45
mutable_cpu_dataMethod · 0.45

Tested by

no test coverage detected