From ba2875ba9416a5789cc8e6d18758ce87177495a8 Mon Sep 17 00:00:00 2001 From: Jeff Donahue Date: Sat, 10 May 2014 14:09:31 -0700 Subject: [PATCH] require either train_net or train_net_param to be specified --- src/caffe/solver.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/caffe/solver.cpp b/src/caffe/solver.cpp index 48434f4..6a8f18f 100644 --- a/src/caffe/solver.cpp +++ b/src/caffe/solver.cpp @@ -46,6 +46,8 @@ void Solver::Init(const SolverParameter& param) { LOG(INFO) << "Creating training net specified in SolverParameter."; net_.reset(new Net(param_.train_net_param())); } else { + CHECK(param_.has_train_net()) + << "Neither train_net nor train_net_param were specified."; LOG(INFO) << "Creating training net from file: " << param_.train_net(); net_.reset(new Net(param_.train_net())); } -- 2.7.4