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

Method LayerSetUp

include/caffe/layers/parameter_layer.hpp:15–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13 explicit ParameterLayer(const LayerParameter& param)
14 : Layer<Dtype>(param) {}
15 virtual void LayerSetUp(const vector<Blob<Dtype>*>& bottom,
16 const vector<Blob<Dtype>*>& top) {
17 if (this->blobs_.size() > 0) {
18 LOG(INFO) << "Skipping parameter initialization";
19 } else {
20 this->blobs_.resize(1);
21 this->blobs_[0].reset(new Blob<Dtype>());
22 this->blobs_[0]->Reshape(this->layer_param_.parameter_param().shape());
23 }
24 top[0]->Reshape(this->layer_param_.parameter_param().shape());
25 }
26 virtual void Reshape(const vector<Blob<Dtype>*>& bottom,
27 const vector<Blob<Dtype>*>& top) { }
28 virtual inline const char* type() const { return "Parameter"; }

Callers

nothing calls this directly

Calls 4

shapeMethod · 0.80
sizeMethod · 0.45
resetMethod · 0.45
ReshapeMethod · 0.45

Tested by

no test coverage detected