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

Method Reshape

rtpose_wrapper/src/caffe/layers/embed_layer.cpp:49–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47
48template <typename Dtype>
49void EmbedLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom,
50 const vector<Blob<Dtype>*>& top) {
51 // Figure out the dimensions
52 M_ = bottom[0]->count();
53 vector<int> top_shape = bottom[0]->shape();
54 top_shape.push_back(N_);
55 top[0]->Reshape(top_shape);
56 // Set up the bias multiplier
57 if (bias_term_) {
58 vector<int> bias_shape(1, M_);
59 bias_multiplier_.Reshape(bias_shape);
60 caffe_set(M_, Dtype(1), bias_multiplier_.mutable_cpu_data());
61 }
62}
63
64template <typename Dtype>
65void EmbedLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,

Callers

nothing calls this directly

Calls 4

caffe_setFunction · 0.85
countMethod · 0.80
shapeMethod · 0.80
mutable_cpu_dataMethod · 0.45

Tested by

no test coverage detected