Skip to content

Commit

Permalink
Make Paddle --save_dir support a directory name (#277)
Browse files Browse the repository at this point in the history
* Also fix #243
  • Loading branch information
luotao1 authored and reyoung committed Oct 28, 2016
1 parent 0e1a22d commit ca5a5ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions paddle/trainer/ParamUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ void ParameterUtil::saveParameters(int passId, int passInnerId) {
}

std::string basePath = config_->getSaveDir();
if (basePath.find('/') == std::string::npos) {
basePath = "./" + basePath;
}
mkDirRecursively(basePath.c_str());

std::string saveDir = path::join(basePath, buf);
Expand Down

0 comments on commit ca5a5ec

Please sign in to comment.