MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / Reshape

Method Reshape

rtpose_wrapper/src/caffe/layers/lrn_layer.cpp:69–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67
68template <typename Dtype>
69void LRNLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom,
70 const vector<Blob<Dtype>*>& top) {
71 CHECK_EQ(4, bottom[0]->num_axes()) << "Input must have 4 axes, "
72 << "corresponding to (num, channels, height, width)";
73 num_ = bottom[0]->num();
74 channels_ = bottom[0]->channels();
75 height_ = bottom[0]->height();
76 width_ = bottom[0]->width();
77 switch (this->layer_param_.lrn_param().norm_region()) {
78 case LRNParameter_NormRegion_ACROSS_CHANNELS:
79 top[0]->Reshape(num_, channels_, height_, width_);
80 scale_.Reshape(num_, channels_, height_, width_);
81 break;
82 case LRNParameter_NormRegion_WITHIN_CHANNEL:
83 split_layer_->Reshape(bottom, split_top_vec_);
84 square_layer_->Reshape(square_bottom_vec_, square_top_vec_);
85 pool_layer_->Reshape(square_top_vec_, pool_top_vec_);
86 power_layer_->Reshape(pool_top_vec_, power_top_vec_);
87 product_layer_->Reshape(product_bottom_vec_, top);
88 break;
89 }
90}
91
92template <typename Dtype>
93void LRNLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,

Callers 15

SetUpMethod · 0.45
TYPED_TESTFunction · 0.45
TYPED_TESTFunction · 0.45
SetUpMethod · 0.45
SetUpMethod · 0.45
TestForwardMethod · 0.45
SetUpMethod · 0.45
TYPED_TESTFunction · 0.45
BiasLayerTestMethod · 0.45
TYPED_TESTFunction · 0.45
SetUpMethod · 0.45
TestForwardSquareMethod · 0.45

Calls 5

num_axesMethod · 0.80
numMethod · 0.80
channelsMethod · 0.45
heightMethod · 0.45
widthMethod · 0.45

Tested by 15

SetUpMethod · 0.36
TYPED_TESTFunction · 0.36
TYPED_TESTFunction · 0.36
SetUpMethod · 0.36
SetUpMethod · 0.36
TestForwardMethod · 0.36
SetUpMethod · 0.36
TYPED_TESTFunction · 0.36
BiasLayerTestMethod · 0.36
TYPED_TESTFunction · 0.36
SetUpMethod · 0.36
TestForwardSquareMethod · 0.36