Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refine paddle_merge_model #4473

Merged
merged 6 commits into from
Oct 26, 2017
Merged

refine paddle_merge_model #4473

merged 6 commits into from
Oct 26, 2017

Conversation

NHZlX
Copy link
Contributor

@NHZlX NHZlX commented Sep 28, 2017

fix #4465

@NHZlX NHZlX requested a review from hedaoyuan October 25, 2017 09:40
@@ -28,7 +29,8 @@ using namespace std; // NOLINT
int main(int argc, char** argv) {
initMain(argc, argv);
initPython(argc, argv);
string confFile = TrainerConfigHelper::getConfigNameFromPath(FLAGS_model_dir);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

在这里加个对参数的检查吧:

if (FLAGS_model_dir.empty() || FLAGS_config_file.empty() || FLAGS_model_file.empty()) {
  LOG(INFO) << "Usage: ./paddle_merge_model --model_dir=pass-00000 --config_file=config.py --model_file=model.paddle";
  return;
}

@@ -19,7 +19,7 @@ import "ModelConfig.proto";
package paddle;

message OptimizationConfig {
required int32 batch_size = 3;
optional int32 batch_size = 3 [ default = 1 ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

使用ModelConfig之后,这里的修改是不是不需要了。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我试了下,还是需要给batch_size设置默认值的。

Copy link
Contributor

@Xreki Xreki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -19,7 +19,7 @@ import "ModelConfig.proto";
package paddle;

message OptimizationConfig {
required int32 batch_size = 3;
optional int32 batch_size = 3 [ default = 1 ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我试了下,还是需要给batch_size设置默认值的。

@NHZlX NHZlX merged commit 4273b35 into PaddlePaddle:develop Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

关于paddle_merge_model 一些疑问
2 participants