Closed
Conversation
8b91327 to
552b2e4
Compare
wangkuiyi
requested changes
Jan 17, 2017
Collaborator
wangkuiyi
left a comment
There was a problem hiding this comment.
好像之前有一个PR,里面内容和这个的很像?
| opt_config_proto = parse_optimizer_config(optimizer_config) | ||
| opt_config = api.OptimizationConfig.createFromProto(opt_config_proto) | ||
| _temp_optimizer_ = api.ParameterOptimizer.create(opt_config) | ||
| opt_config_proto = paddle.config.parse_optimizer(optimizer_config) |
Collaborator
There was a problem hiding this comment.
这里还是不要依赖把 optimzier_config 定义成一个函数。因为这里其实应该不需要protobuf吧。
| _temp_optimizer_ = api.ParameterOptimizer.create(opt_config) | ||
| opt_config_proto = paddle.config.parse_optimizer(optimizer_config) | ||
| opt_config = paddle.raw.OptimizationConfig.createFromProto(opt_config_proto) | ||
| _temp_optimizer_ = paddle.raw.ParameterOptimizer.create(opt_config) |
Collaborator
There was a problem hiding this comment.
这里需要定义一个temporary variable,不容易理解为什么需要它。
| model_config = parse_network_config(network_config) | ||
| m = api.GradientMachine.createFromConfigProto( | ||
| model_config, api.CREATE_MODE_NORMAL, enable_types) | ||
| model_config = paddle.config.parse_network(network_config) |
Collaborator
There was a problem hiding this comment.
类似的,model_config一定要是protobuf吗?
| # This type check is not useful. Only enable type hint in IDE. | ||
| # Such as PyCharm | ||
| assert isinstance(m, api.GradientMachine) | ||
| assert isinstance(m, paddle.raw.GradientMachine) |
Collaborator
There was a problem hiding this comment.
如果上面的代码是 m = paddle.gradient_mahcine.new(...) ,那么这里不需要这一行,也可以让用户了明白 m 是一个 gradient machine了。
Collaborator
Author
|
Closed because mnist should be review first. |
zhhsplendid
pushed a commit
to zhhsplendid/Paddle
that referenced
this pull request
Sep 25, 2019
* modify fluid.rst and layers.rst and gen_doc.py * synchronize api_cn of develop 0823,test=document_preview * update io_cn.rst * delete ComposeNotAligned_cn.rst
wangxicoding
pushed a commit
to wangxicoding/Paddle
that referenced
this pull request
Dec 9, 2021
…n_equal_1_bug fix viterbi len=1 bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review #1108 #1121 first.