forked from PaddlePaddle/Paddle
-
Notifications
You must be signed in to change notification settings - Fork 0
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
add config_parser in trainer_config_helpers to seperate trainer config #1
Closed
jacquesqiao
wants to merge
102
commits into
reyoung:feature/mnist_train_api
from
jacquesqiao:mnist_train_api_conf
Closed
Changes from 1 commit
Commits
Show all changes
102 commits
Select commit
Hold shift + click to select a range
529f24c
cpu cmrnorm
hedaoyuan 9503590
add CrossMapNormal
hedaoyuan e357f27
add GPU CrossMapNormal
hedaoyuan 0eac399
priorbox layer for ssd
39d689e
Format the priorbox code
438a704
add rnn_cn.md
9600932
Add fake gpu support of the priorbox layer for the moment
c007608
Format the python file.
a1d2abc
add Function
hedaoyuan ce1d98e
Add a Tensor to use as a Function argument
hedaoyuan 214343a
modify details
660b310
modify line183 beam search
4ebb3eb
imporve Function
hedaoyuan 9171ab0
Merge branch 'develop' of https://github.com/baidu/Paddle into cmrnorm
hedaoyuan 707a9c9
Fix variable name and add the annotation
520342e
Fix code format
d2d0010
add CrossMapNormalGradFunc
hedaoyuan 22a5e47
move Function to function dir
hedaoyuan 558e869
add CMakeLists
hedaoyuan d11e2b4
Remove some useless code
hedaoyuan f13aeb5
fix swig_api
hedaoyuan 1048aee
Add input layer check
cee9346
add some comments
hedaoyuan 5222b58
support UBUNTU MIRROR and modify doc
wen-bo-yang 2b91bf1
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
wen-bo-yang 5b746fb
modify doc doc/getstarted/build_and_install/docker_install_en.rst
wen-bo-yang 36af605
modify doc
wen-bo-yang 9f990d9
Add unittest of the priorbox layer
8d9f675
Add header files
d40bb72
modify rnn_config_cn.rst
cad325f
Add header file
38723e7
remove random flag
7dfe3bd
remove gpu memory alloc
148bd4d
add Layer::createFunction
hedaoyuan 1a06697
travis for check broken links
luotao1 706c572
Matrix API refactor, when passing parameters, convert shared_ptr (Mat…
4fbf949
Refactor MUL functions, pass object reference instead of shared_ptr.
4855821
Merge branch 'develop' into checker
luotao1 204152c
set -e for docs.sh
luotao1 8f08fa1
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
wen-bo-yang bf26679
update docker_install_en.rst
wen-bo-yang 6f8f468
Add priorbox layer gpu unit test.
5fddd99
move TEST from test_matrixCompare.cpp to cross_map_normal_op_test.cpp
hedaoyuan bf32411
Merge branch 'develop' of https://github.com/baidu/Paddle into cmrnorm
hedaoyuan f1a94e3
follow comments
hedaoyuan f4f0f2d
Fix bug in config_parse.py when batch_norm layer is used in Recurrent…
qingqing01 35bbb4f
change float to real in two test
dadd48a
Merge pull request #963 from reyoung/feature/add_const_in_parameter_u…
reyoung 9049369
Merge pull request #934 from tianbingsz/paddle_function_mat
tianbingsz 42e1217
Merge pull request #854 from hedaoyuan/cmrnorm
tianbingsz 37f7595
Merge pull request #927 from wen-bo-yang/develop_test
wangkuiyi 84ad724
Adding namespace in timing macros
5bb29ec
close log info in BN.
qingqing01 a6f772b
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
qingqing01 67fcd89
fix array style problem
5471e87
Merge branch 'develop' into checker
luotao1 de8927e
refine docs.sh
luotao1 f202929
Change type float to real.
1b8e151
Support user specified label input in tests
06ea2bf
Merge pull request #967 from pengli09/fix_test_type
pengli09 39a5477
refine docs.sh
luotao1 4e34220
Merge pull request #970 from reyoung/feature/clean_parameter_updater_…
reyoung e4c492d
change type to bool.
qingqing01 567871f
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
qingqing01 446e3c2
Merge pull request #946 from luotao1/checker
luotao1 8bd4752
Merge branch 'develop' into add_label_seq_pos_to_inputdef
1f4f044
A tiny fix in PyDataProvider2
reyoung bbf3b47
Merge pull request #966 from qingqing01/batch_norm
qingqing01 adc5839
Merge pull request #969 from reyoung/feature/clean_gradient_machine_s…
reyoung d09564b
change std::vector<int> to const reference
cf5bf5b
Merge branch 'feature/fix_param_hidden_in_pydp2' into feature/mnist_t…
reyoung 28c5010
Merge pull request #976 from pengli09/add_label_seq_pos_to_inputdef
pengli09 22aacbf
Add const to GradientMachine::eval
reyoung 4d81b36
A tiny fix in PyDataProvider2
reyoung 4d5a0b0
Also add const to makeEvaluator
reyoung 1e6c87b
Merge branch 'feature/add_const_in_gradient_machine_eval' into featur…
reyoung e8e58fb
add config_parser in trainer_config_helpers to seperate trainer config
jacquesqiao 8d24931
Change member variables from public to protected
eaba2e2
Expose Evaluator API
reyoung 409a577
Complete a very simple mnist demo.
reyoung 06dc66b
Merge branch 'feature/fix_param_hidden_in_pydp2' into feature/mnist_t…
reyoung b53bdcd
Merge pull request #867 from Noplz/ssd
qingqing01 e031f0c
Fix typo in PyDataProvider2.py
9baf7fc
Fix data provider bug in srl demo
c1b294a
Merge pull request #974 from emailweixu/timer_namespace
backyes db82a0e
Merge pull request #980 from reyoung/feature/add_const_in_gradient_ma…
gangliao 89bf2e4
Change float to real in NormLayer.h
680dd92
Add AverageOptimizer, Add save parameter
reyoung c6b2bfe
Merge pull request #986 from pengli09/fix-pydata-provider-doc-typo
pengli09 a7b5d94
Merge pull request #987 from pengli09/fix-srl-demo-data-provider-bug
pengli09 4f70880
Merge pull request #881 from livc/rnn
Zrachel 5bca268
Add gitignore
reyoung 4490bf9
Merge pull request #990 from pengli09/norm-layer
qingqing01 59009ba
Always use copy method for numpy.
reyoung a31ef0c
Merge branch 'feature/mnist_train_api' of github.com:reyoung/Paddle i…
reyoung f06b64f
Test GPU
reyoung 65e957c
Merge branch 'feature/mnist_train_api' of github.com:reyoung/Paddle i…
reyoung 5a68584
Test on GPU
reyoung 16ea66e
Merge branch 'develop' of github.com:baidu/Paddle into feature/mnist_…
reyoung 3a80272
Add comments.
reyoung 87d4e60
add config_parser_utils
jacquesqiao 7029247
add config_parser_utils
jacquesqiao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add config_parser in trainer_config_helpers to seperate trainer config
- Loading branch information
commit e8e58fb0674afe7ef600ccea18ff9e8887e1ffd1
There are no files selected for viewing
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import paddle.trainer.config_parser as config_parser | ||
''' | ||
This file is a wrapper of formal config_parser. The main idea of this file is to | ||
separete different config logic into different function, such as network configuration | ||
and optimizer configuration. | ||
''' | ||
|
||
__all__ = [ | ||
"parse_trainer_config", "parse_network_config", "parse_optimizer_config" | ||
] | ||
|
||
|
||
def parse_trainer_config(trainer_conf, config_arg_str): | ||
return config_parser.parse_config(trainer_conf, config_arg_str) | ||
|
||
|
||
def parse_network_config(network_conf): | ||
config = config_parser.parse_config(network_conf, '') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个config_arg_str还是给暴露出来吧。可以把默认参数设置成''。即 def parse_network_config(network_conf, config_arg_str=None):
if config_arg_str is None:
config_arg_str = ''
... 这个参数比较有用。 |
||
return config.model_config | ||
|
||
|
||
def parse_optimizer_config(optimizer_conf): | ||
config = config_parser.parse_config(optimizer_conf, '') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 同上 |
||
return config.opt_config |
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.
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.
换一个文件名吧?这个文件名感觉已经被使用过了。
类似于config_parser_utils.py就好了