-
Notifications
You must be signed in to change notification settings - Fork 755
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
nn.Graph python #5309
nn.Graph python #5309
Conversation
|
的确会,叫graph_api.h/.cpp怎么样 |
这个放到 |
这个不仅仅是 api,C++ 的 nn.Graph 对象是要有一系列逻辑(类似于之前的 JobBuildAndInferCtx),不是 python api 独有的内容。是否可以放到 framework 路径下? |
This comment has been minimized.
This comment has been minimized.
oneflow/python/nn/graph.py
Outdated
|
||
@property | ||
def state_tensortuple(self): | ||
return tensor_tuple_util.convert_to_tensor_tuple(tuple(t for _, t in self._named_state())) |
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.
给nn.Graph增加了这个属性,但是感觉state_tensortuple只有内部使用,这个转换是不是适合在使用的地方做
这个 PR 先不处理 call 相关的复杂逻辑,仅提供一个 nn.Graph 和 NNGraph 的架子。先review 合并了吧 ~ 我 和 文骁 @leaves-zwx 都 review 一下,尽早合并。 |
先解决一下冲突,转成 正式 PR,并通过 CI @strint |
nn.Graph
注册Module产生的graph的结构: