-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Change parallel_do to parallel_executor. #833
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
Change parallel_do to parallel_executor. #833
Conversation
fluid/ocr_recognition/ctc_train.py
Outdated
| add_arg('learning_rate', float, 1.0e-3, "Learning rate.") | ||
| add_arg('l2', float, 0.0004, "L2 regularizer.") | ||
| add_arg('max_clip', float, 10.0, "Max clip threshold.") | ||
| add_arg('min_clip', float, -10.0, "Min clip threshold.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
max_clip and min_clip are not removed.
fluid/ocr_recognition/ctc_train.py
Outdated
| add_arg('test_list', str, None, "The list file of training images." | ||
| "None means using the default test_list file of reader.") | ||
| add_arg('num_classes', int, None, "The number of classes." | ||
| "None means using the default num_classes from reader.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如之前线下讨论,一些使用频率低的参数需要去掉。
fluid/ocr_recognition/ctc_train.py
Outdated
| def save_model(args, exe, pass_id, batch_id): | ||
| filename = "model_%05d_%d" % (pass_id, batch_id) | ||
| fluid.io.save_params(exe, dirname=args.save_model_dir, filename=filename) | ||
| print "Saved model to: %s/%s." %(args.save_model_dir, filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
train_one_batch、test、save_model会被其他文件用到吗?如果没有,是不是放在 def train()里好些,这样也可以减少参数的传递,比如args, exe, test_reader等都不用传了。
… parallel_executor And some fix: 1. Remove some arguments 2. Rename 'inference' to 'infer' 3. Refine document
| error_evaluator = fluid.evaluator.EditDistance( | ||
| input=decoded_out, label=casted_label) | ||
|
|
||
| # error_evaluator = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
fluid/ocr_recognition/ctc_train.py
Outdated
| name='label', shape=[1], dtype='int32', lod_level=1) | ||
| sum_cost, error_evaluator, inference_program, model_average = ctc_train_net( | ||
| images, label, args, num_classes) | ||
| # sys.exit(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
No description provided.