From 3d204f5fe4614624ca342090feecbfe4df188d9d Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Sun, 8 Mar 2015 22:25:52 +0800 Subject: scaffolding, tested --- model/ranksvm.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'model') diff --git a/model/ranksvm.cpp b/model/ranksvm.cpp index 6294245..060001b 100644 --- a/model/ranksvm.cpp +++ b/model/ranksvm.cpp @@ -12,7 +12,8 @@ int RSVM::saveModel(const string fname){ std::ofstream fout(fname.c_str()); fout<getName()<model; + fout<fsize<model); return 0; } @@ -37,8 +38,8 @@ RSVM* RSVM::loadModel(const string fname){ } int RSVM::setModel(const Eigen::VectorXd &model) { - if (model.cols()!=fsize) - LOG(FATAL) << "Feature size mismatch"; + if (model.rows()!=fsize) + LOG(FATAL) << "Feature size mismatch: "<model=model; return 0; } \ No newline at end of file -- cgit v1.2.3-70-g09d2