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.
Based on PR #3546
Commit is 6d6180d
补充一些没来得及实现的想法:
出栈入栈(RNN/IF):
即RNN和IF中的每一个block都是一个函数,在开始调用函数和结束调用函数的时候,进行出栈入栈。
子图:
获取子图只能从根网络(即最初的网络)进行。子图获得可以简单的维护一个需要依赖的Variable的名字集合,然后反向遍历Net中的Op。当一个Op的输出的任意一个在名字集合中,将这个Op加入新的子图,同时将这个Op的所有输入加到名字集合中。