在理解如何使caffe运行之后,我们要理解它是如何运行的,即了解Solver类的Solve()函数做了什么,对于Solver类中如何初始化网络以及其他参数,有兴趣的可以深入研究。
源码中Solver()函数是有参数形式的
// The main entry of the solver function. In default, iter will be zero. Pass
// in a non-zero iter number to resume training for a pre-trained net.
virtual void Solve(const char* resume_file = NULL);
inline void Solve(const string resume_file) { Solve(resume_file.c_str()); }
各位一看就明白了吧。再看Solve函数的定义
template <typename Dtype>
void Solver<Dtype>::Solve(const char* resume_file) {
CHECK(Caffe::root_solver());
LOG(INFO) << "Solving " << net_->name();
LOG(INFO) << "Learning Rate Policy: " << param_.lr_policy();
// Initialize to false every time we start solving.
requested_early_exit_ = false;
if (resume_file) {
LOG(INFO) << "Restoring previo
版权声明:本文为aitazhixin原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。