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

Init Python API #4641

Merged

Conversation

reyoung
Copy link
Collaborator

@reyoung reyoung commented Oct 9, 2017

Following the design

Just written Program, Block and unittest of program.

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
Copy link
Collaborator Author

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.

@reyoung reyoung force-pushed the feature/add_persistable_in_var_desc branch from f8d4201 to 61a5181 Compare October 9, 2017 18:04
return Variable(self, *args, **kwargs)

def append_op(self, *args, **kwargs):
op_proto = self.proto.append_op()
Copy link
Collaborator

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

Copy link
Collaborator Author

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.

Copy link
Collaborator

@JiayiFeng JiayiFeng left a 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.

@reyoung reyoung merged commit 7973d3a into PaddlePaddle:develop Oct 10, 2017
@reyoung reyoung deleted the feature/add_persistable_in_var_desc branch October 12, 2017 19:48
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.

None yet

2 participants