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

Method PreSolve

src/caffe/solvers/sgd_solver.cpp:66–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64
65template <typename Dtype>
66void SGDSolver<Dtype>::PreSolve() {
67 // Initialize the history
68 const vector<Blob<Dtype>*>& net_params = this->net_->learnable_params();
69 history_.clear();
70 update_.clear();
71 temp_.clear();
72 for (int i = 0; i < net_params.size(); ++i) {
73 const vector<int>& shape = net_params[i]->shape();
74 history_.push_back(shared_ptr<Blob<Dtype> >(new Blob<Dtype>(shape)));
75 update_.push_back(shared_ptr<Blob<Dtype> >(new Blob<Dtype>(shape)));
76 temp_.push_back(shared_ptr<Blob<Dtype> >(new Blob<Dtype>(shape)));
77 }
78}
79
80template <typename Dtype>
81void SGDSolver<Dtype>::ClipGradients() {

Callers

nothing calls this directly

Calls 2

shapeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected