void Solver<Dtype>::Init(const SolverParameter& param) { LOG(INFO) << "Initializing solver from parameters: " << std::endl << param.DebugString(); param_ = param; if (param_.random_seed() >= 0) { Caffe::set_random_seed(param_.random_seed()); } // Scaffolding code InitTrainNet(); InitTestNets(); LOG(INFO) << "Solver scaffolding done."; }
void Solver<Dtype>::Init(const SolverParameter& param) { LOG(INFO) << "Initializing solver from parameters: " << std::endl << param.DebugString(); param_ = param; CHECK_GE(param_.average_loss(), 1) << "average_loss should be non-negative."; if (param_.random_seed() >= 0) { Caffe::set_random_seed(param_.random_seed()); } // Scaffolding code InitTrainNet(); InitTestNets(); LOG(INFO) << "Solver scaffolding done."; iter_ = 0; current_step_ = 0; }
void Solver<Dtype>::Init(const SolverParameter& param) { CHECK(Caffe::root_solver() || root_solver_) << "root_solver_ needs to be set for all non-root solvers"; LOG_IF(INFO, Caffe::root_solver()) << "Initializing solver from parameters: " << std::endl << param.DebugString(); param_ = param; CHECK_GE(param_.average_loss(), 1) << "average_loss should be non-negative."; CheckSnapshotWritePermissions(); if (Caffe::root_solver() && param_.random_seed() >= 0) { Caffe::set_random_seed(param_.random_seed()); } // Scaffolding code InitTrainNet(); if (Caffe::root_solver()) { InitTestNets(); LOG(INFO) << "Solver scaffolding done."; } iter_ = 0; current_step_ = 0; }
void Solver::Init() { LOG(INFO) << "Solver data type: " << Type_Name(data_type_); CHECK(Caffe::root_solver() || root_solver_) << "root_solver_ needs to be set for all non-root solvers"; LOG_IF(INFO, Caffe::root_solver()) << "Initializing solver from parameters: " << std::endl << param_.DebugString(); CHECK_GE(param_.average_loss(), 1) << "average_loss should be non-negative."; CheckSnapshotWritePermissions(); if (Caffe::root_solver()) { // P2PSync does other solvers if they exist Caffe::set_root_seed(static_cast<uint64_t>(param_.random_seed())); } // Scaffolding code InitTrainNet(); InitTestNets(); LOG(INFO) << "Solver scaffolding done."; iter_ = 0; total_lapse_ = 0.F; current_step_ = 0; }