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

Method Forward_cpu

src/caffe/layers/sigmoid_layer.cpp:14–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12
13template <typename Dtype>
14void SigmoidLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
15 const vector<Blob<Dtype>*>& top) {
16 const Dtype* bottom_data = bottom[0]->cpu_data();
17 Dtype* top_data = top[0]->mutable_cpu_data();
18 const int count = bottom[0]->count();
19 for (int i = 0; i < count; ++i) {
20 top_data[i] = sigmoid(bottom_data[i]);
21 }
22}
23
24template <typename Dtype>
25void SigmoidLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top,

Callers

nothing calls this directly

Calls 4

countMethod · 0.80
sigmoidFunction · 0.70
cpu_dataMethod · 0.45
mutable_cpu_dataMethod · 0.45

Tested by

no test coverage detected