more accurate to early stop train sparse model

avx_docs
wangyanfei01 8 years ago committed by Yu Yang
parent b67d78e7ae
commit 76acf3f8b9

@ -46,6 +46,12 @@ Tester::Tester(const std::shared_ptr<TrainerConfigHelper>& config,
gradientMachine_(gradientMachine),
parameterUpdater_(parameterUpdater),
testDataProvider_(testDataProvider) {
if (config_->getOptConfig().use_sparse_remote_updater()) {
LOG(FATAL) << "It's prohibited to set sparse_remote_update "
<< "in some layers if testing will be under going "
<< "in the middle of training. You can do testing "
<< "within separate process.";
}
testEvaluator_.reset(gradientMachine_->makeEvaluator());
if (intconfig_->distributeTest) {
testParameterClient_.reset(new ParameterClient2(true));

@ -222,12 +222,6 @@ void Trainer::init(const std::shared_ptr<TrainerConfigHelper>& config,
DataProvider::create(config_->getTestDataConfig(), *config_, gpuData));
}
if (testDataProvider_) {
if (config_->getOptConfig().use_sparse_remote_updater()) {
LOG(FATAL) << "It's prohibited to set sparse_remote_update "
<< "in some layers if testing will be under going "
<< "in the middle of training. You can do testing "
<< "within separate process.";
}
createTester();
}

Loading…
Cancel
Save