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

Feature/check input types #673

Closed

Conversation

reyoung
Copy link
Collaborator

@reyoung reyoung commented Nov 30, 2016

框架性质的实现了 #341 。只是实现了 data、fc、trans、selective fc几个layer的check工作。

这个事情我又重新思考了一下,感觉在CPP里面实现这个功能可能还是比较慢,鉴于我们最近事情比较多,所以我们还是在Python中把这个事情搞一下吧。

在Python中实现这个事情的缺点就是,需要用户在data_layer里面修改一下设置size的方式,从原来直接设置size=,改成设置input_type=,进而可以获得到data_layer的数据类型。

从而可以让后续的层获得正确的数据类型,这样我们就可以依次检查每个Layer的输入格式了。

对于每个Layer输入格式的检查,使用了python的decorator和类似于调用链的方式。decorator是因为,每个Layer可以接受什么类型的输入,产生什么类型的输出,是每一个Layer的属性。使用decorator给Layer做出标注,语意更清晰。

使用调用链模式,是因为,每个Layer可以接受的输入和产生的输出不一样,使用调用链可以有效的组合各种情况,在定义各种Layer的输入和输出的时候,会减少代码量。

@reyoung reyoung added this to the 0.10.0 milestone Nov 30, 2016
* Also add CompositeChecker which could combine many checkers.
* Add default_seq_type_and_size
@reyoung
Copy link
Collaborator Author

reyoung commented Dec 1, 2016

Close due to discussed to add type definitions in Layer by @emailweixu

@reyoung reyoung closed this Dec 1, 2016
@reyoung reyoung deleted the feature/check_input_types branch December 18, 2016 07:56
zhhsplendid pushed a commit to zhhsplendid/Paddle that referenced this pull request Sep 25, 2019
zhhsplendid pushed a commit to zhhsplendid/Paddle that referenced this pull request Sep 25, 2019
* synchronize with develop (PaddlePaddle#642)

* update_commitid1.3 (PaddlePaddle#641)

* update inference c++ API doc (PaddlePaddle#634)

* update inference c++ API doc

* fix link

* thorough clean for doc (PaddlePaddle#644)

* thorough clean

* delete_DS_Store

* Cherrypick1.3 (PaddlePaddle#652)

* thorough clean

* delete_DS_Store

* [Don't merge now]update_install_doc (PaddlePaddle#643)

* update_install_doc

* follow_comments

* add maxdepth (PaddlePaddle#646)

* upload_md (PaddlePaddle#649)

* update_version (PaddlePaddle#650)

* Translation of 16 new apis (PaddlePaddle#651)

* fix_windows

* Final update 1.3 (PaddlePaddle#653)

* thorough clean

* delete_DS_Store

* update_1.3

* Deadlink fix (PaddlePaddle#654)

* fix_deadlinks

* update_docker

* Update release_note.rst

* Update index_cn.rst

* update_Paddle (PaddlePaddle#658)

* fix pic (PaddlePaddle#659)

* [to 1.3] cn api debug (PaddlePaddle#655) (PaddlePaddle#661)

* debug

* fix 2 -conv2d

* "锚" ==> anchor(s)

* Weekly cherrypick0302 (PaddlePaddle#668)

* Update programming_guide.md (PaddlePaddle#664)

* Update programming_guide.md

* Update programming_guide_en.md

* Update cn api to 1.3 (PaddlePaddle#663)

* Update cn api to 1.3 fluid & layers

* Rest to 1.3

* Weeklyupdate 0301 (PaddlePaddle#666)

* Tables_rm_op

* update_op

* update_index

* update_book_0302 (PaddlePaddle#667)

* fix_format (PaddlePaddle#669) (PaddlePaddle#670)

* fix_format

* Update Tables.md

* Update Tables_en.md

* add dataset api_cn (PaddlePaddle#673)

* rm fluid.core in desigin_idea (PaddlePaddle#674)

* Update fluid_design_idea.md

* Update fluid_design_idea_en.md

* Fix array_read code example error. (PaddlePaddle#671)

Signed-off-by: zhaoyuchen <zhaoyuchen01@baidu.com>

* add data_reader_cn (PaddlePaddle#676)

* fix doc error (PaddlePaddle#675)

* update_book_commitid (PaddlePaddle#680)

* update_book_commitid

* commitid0309

* fix typo

* book indexes (PaddlePaddle#677)
yaozhixin pushed a commit to graphcore/Paddle-fork that referenced this pull request Apr 28, 2022
…-ipu_607c07ebeff2c055fde72b594ed009c41b14c06d

[AUTO PR] Pulling [develop] into [develop-ipu] [2022-04-27 11:51:41+08:00]
wwbitejotunn pushed a commit to wwbitejotunn/Paddle that referenced this pull request Jun 21, 2024
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.

4 participants