Skip to content

Conversation

JiayiFeng
Copy link
Collaborator

No description provided.


message VarProto {
required string name = 1;
required string comment = 2;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider add bool is_tensor = 3;.

required string comment = 5;
};
```

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


Python APIs are divided into two types, high-level API and low-level API.

### High-Level API
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paddle.layer?


*TODO*

## Op and Kernal
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section "Op and kernel" need more discussion. We can remove this section from this PR, and merge it. So we could add this section in future PRs.

Copy link
Collaborator

@wangkuiyi wangkuiyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

message AttrProto {
required string name = 1;
required string comment = 2;
optional AttrValue default = 3;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given

virtual bool Operator::ValidateAttrs() const {}

we don't need max and min here.

@wangkuiyi
Copy link
Collaborator

wangkuiyi commented Jul 3, 2017

Work in parallel:

  1. Given OperatorProto generate Python op creator functions.
  2. Python op creator functions calls paddle::framework::CreateOp.
  3. Python op creator functions call C++ functions via C wrappers.
  4. paddle::framework::CreateOp depends on operator registration.
    class Operator {
     public:
      ~Operator() {}
      virtual std::string ValidateAttrs() { return validator_(); }
      virtual void Run() = 0;
    
     private:
      std::function<std::string()> validator_;
    };

@JiayiFeng JiayiFeng merged commit f3c9789 into PaddlePaddle:develop Jul 3, 2017
@JiayiFeng JiayiFeng deleted the add_simple_op_design branch July 3, 2017 07:01
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.

2 participants