-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
format python code in demo, doc, doc_cn and paddle directories #445
Conversation
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.
先merge进去,再提另一个PR修改。
|
||
settings.logger.info('Image size: %s', settings.img_size) | ||
settings.logger.info('Meta path: %s', settings.meta_path) | ||
settings.input_types = [ | ||
dense_vector(settings.img_raw_size), # image feature | ||
integer_value(settings.num_classes)] # labels | ||
integer_value(settings.num_classes) |
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.
注释在上一行。
@@ -13,9 +13,9 @@ | |||
# limitations under the License. | |||
|
|||
o = open("./" + "train.list", "w") | |||
o.write("./data/raw_data/train" +"\n") | |||
o.write("./data/raw_data/train" + "\n") |
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.
这个写法很奇怪,为什么不直接写成一个字符串呢?
@@ -69,7 +68,8 @@ def hook(settings, image_size, crop_size, color, file_list, | |||
|
|||
settings.input_types = [ | |||
dense_vector(settings.img_input_size), # image feature | |||
integer_value(1)] # labels | |||
integer_value(1) |
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.
注释应该在这一行
integer_value_sequence(len(word_dict)) if options.seq | ||
else sparse_binary_vector(len(word_dict)), | ||
integer_value(2)] | ||
integer_value_sequence(len(word_dict)) if options.seq else |
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.
这个写法略微有点奇怪。
@@ -274,14 +280,14 @@ def save_data_multi_lines(self, data, prefix = "", | |||
self.create_dict(data_list) | |||
|
|||
length = len(label_list) | |||
perm_list = np.array([ i for i in xrange(length) ]) |
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.
这种写法有点奇怪
* add_api_cn (PaddlePaddle#437) * add gpu benchmark page (PaddlePaddle#436) * add gpu benchmark * fix comments * add chinese link in gen_doc.py (PaddlePaddle#439) * modified gen_doc.py * Update gen_doc.py * update gen_doc.py * Update mobile doc (PaddlePaddle#440) * update_en_structure * update_Paddle_commitid * delete_DS * update_mobile_doc * Update book commit (PaddlePaddle#438) * update_en_structure * update_Paddle_commitid * delete_DS * update_book_commit_id * update_api_rst * Adjust structure of advanced usage (PaddlePaddle#442) * adjust_structure_of_advanced_usage * Update paddle_gpu_benchmark.md * adjust_toctree_hidden * fix_api_guide * Update index.rst * fix deadlinkes (PaddlePaddle#443) * add_toctree (PaddlePaddle#445) * adjust_beginners_structure (PaddlePaddle#446) * adjust_beginners_structure * Update index.rst * update install_doc for python3 (PaddlePaddle#418) * update install_doc for python3 * update python3.5+ info,test=develop * fix review, test=develop * fix_pic (PaddlePaddle#447)
* add_api_cn (PaddlePaddle#437) * add gpu benchmark page (PaddlePaddle#436) * add gpu benchmark * fix comments * add chinese link in gen_doc.py (PaddlePaddle#439) * modified gen_doc.py * Update gen_doc.py * update gen_doc.py * Update mobile doc (PaddlePaddle#440) * update_en_structure * update_Paddle_commitid * delete_DS * update_mobile_doc * Update book commit (PaddlePaddle#438) * update_en_structure * update_Paddle_commitid * delete_DS * update_book_commit_id * update_api_rst * Adjust structure of advanced usage (PaddlePaddle#442) * adjust_structure_of_advanced_usage * Update paddle_gpu_benchmark.md * adjust_toctree_hidden * fix_api_guide * Update index.rst * fix deadlinkes (PaddlePaddle#443) * add_toctree (PaddlePaddle#445) * adjust_beginners_structure (PaddlePaddle#446) * adjust_beginners_structure * Update index.rst * update install_doc for python3 (PaddlePaddle#418) * update install_doc for python3 * update python3.5+ info,test=develop * fix review, test=develop * fix_pic (PaddlePaddle#447) * delete en2zn link * update lod_tensor * 1207 1.english api reference links removed 2. formatted * update transpiler * update profilse_cn
* add_api_cn (PaddlePaddle#437) * add gpu benchmark page (PaddlePaddle#436) * add gpu benchmark * fix comments * add chinese link in gen_doc.py (PaddlePaddle#439) * modified gen_doc.py * Update gen_doc.py * update gen_doc.py * Update mobile doc (PaddlePaddle#440) * update_en_structure * update_Paddle_commitid * delete_DS * update_mobile_doc * Update book commit (PaddlePaddle#438) * update_en_structure * update_Paddle_commitid * delete_DS * update_book_commit_id * update_api_rst * Adjust structure of advanced usage (PaddlePaddle#442) * adjust_structure_of_advanced_usage * Update paddle_gpu_benchmark.md * adjust_toctree_hidden * fix_api_guide * Update index.rst * fix deadlinkes (PaddlePaddle#443) * add_toctree (PaddlePaddle#445) * adjust_beginners_structure (PaddlePaddle#446) * adjust_beginners_structure * Update index.rst * update install_doc for python3 (PaddlePaddle#418) * update install_doc for python3 * update python3.5+ info,test=develop * fix review, test=develop * fix_pic (PaddlePaddle#447) * delete en2zn link * update lod_tensor * 1207 1.english api reference links removed 2. formatted * update transpiler * update profilse_cn * Update docker-image instroduce, test=develop (PaddlePaddle#459) * fix_bug (PaddlePaddle#460) * [cp2dev]Add avx info 1.1 (PaddlePaddle#279) (PaddlePaddle#451) * Add avx info 1.1 (PaddlePaddle#279) * refine avx info representation * refine avx info representation * refine avx info representation * updatetoavx * fix_AVX * update_en_api (PaddlePaddle#461) * update api guides for cn (PaddlePaddle#462) * Update commit_id of Paddle (PaddlePaddle#463) * update_en_api * update_again * Fix bug (PaddlePaddle#465) * update_en_api * update_again * bug_fix * fix_2nd
* add_api_cn (PaddlePaddle#437) * add gpu benchmark page (PaddlePaddle#436) * add gpu benchmark * fix comments * add chinese link in gen_doc.py (PaddlePaddle#439) * modified gen_doc.py * Update gen_doc.py * update gen_doc.py * Update mobile doc (PaddlePaddle#440) * update_en_structure * update_Paddle_commitid * delete_DS * update_mobile_doc * Update book commit (PaddlePaddle#438) * update_en_structure * update_Paddle_commitid * delete_DS * update_book_commit_id * update_api_rst * Adjust structure of advanced usage (PaddlePaddle#442) * adjust_structure_of_advanced_usage * Update paddle_gpu_benchmark.md * adjust_toctree_hidden * fix_api_guide * Update index.rst * fix deadlinkes (PaddlePaddle#443) * add_toctree (PaddlePaddle#445) * adjust_beginners_structure (PaddlePaddle#446) * adjust_beginners_structure * Update index.rst * update install_doc for python3 (PaddlePaddle#418) * update install_doc for python3 * update python3.5+ info,test=develop * fix review, test=develop * fix_pic (PaddlePaddle#447) * delete en2zn link * update lod_tensor * 1207 1.english api reference links removed 2. formatted * update transpiler * update profilse_cn * Update docker-image instroduce, test=develop (PaddlePaddle#459) * fix_bug (PaddlePaddle#460) * [cp2dev]Add avx info 1.1 (PaddlePaddle#279) (PaddlePaddle#451) * Add avx info 1.1 (PaddlePaddle#279) * refine avx info representation * refine avx info representation * refine avx info representation * updatetoavx * fix_AVX * update_en_api (PaddlePaddle#461) * update api guides for cn (PaddlePaddle#462) * Update commit_id of Paddle (PaddlePaddle#463) * update_en_api * update_again * Fix bug (PaddlePaddle#465) * update_en_api * update_again * bug_fix * fix_2nd * add_release_note
* "add mlm params to dygraph ernie1.0" * finish p-tuning v1.0 * mend * delete unused coment * add label_normalized * P-tuning: support Chid task of FewCLUE * 1. decouple evaluate and train * 1.add FewCLUE datasets(9/9) 2.implement p-tuning strategy by transform_function 3.unify train_script beteween `chid` task and other 8 tasks of FewCLUE * add README.md * update FewCLUE data * add predict.py for FewCLUE
* update custom op demo * update custom_pattern demo * move disbaled UTs
use pep8 code style to format python code in demo, doc, doc_cn and paddle directories
except for paddle/scripts/cpplint.py
#254