-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Init Python API #4641
Init Python API #4641
Conversation
Following the design * https://github.com/PaddlePaddle/Paddle/blob/develop/doc/design/python_api.md Just written `Program`, `Block` and unittest of program.
@@ -0,0 +1,45 @@ | |||
import paddle.v2.framework.core as core |
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.
I am not sure what's the name of this module. It will contain Block
, Program
, Var
, and Operator
.
Since they will cross-reference each other, they can only be in one Python file.
Use graph.py
temporary, if there is a better name, it will be changed in following PR.
f8d4201
to
61a5181
Compare
…rsistable_in_var_desc
…rsistable_in_var_desc
return Variable(self, *args, **kwargs) | ||
|
||
def append_op(self, *args, **kwargs): | ||
op_proto = self.proto.append_op() |
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.
It should be op_desc
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.
Maybe we should change design first.
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.
LGTM. This part is under development. We can fix potential errors in later prs.
Following the design
Just written
Program
,Block
and unittest of program.