提交 ca5a5ec4 编写于 作者: L luotao1 提交者: Yu Yang

Make Paddle --save_dir support a directory name (#277)

* Also fix #243 
上级 0e1a22d0
...@@ -89,6 +89,9 @@ void ParameterUtil::saveParameters(int passId, int passInnerId) { ...@@ -89,6 +89,9 @@ void ParameterUtil::saveParameters(int passId, int passInnerId) {
} }
std::string basePath = config_->getSaveDir(); std::string basePath = config_->getSaveDir();
if (basePath.find('/') == std::string::npos) {
basePath = "./" + basePath;
}
mkDirRecursively(basePath.c_str()); mkDirRecursively(basePath.c_str());
std::string saveDir = path::join(basePath, buf); std::string saveDir = path::join(basePath, buf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册