-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Network implement #2730
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
Network implement #2730
Conversation
paddle/framework/net.h
Outdated
/** | ||
* @brief Infer shapes of all inputs and outputs of operators. | ||
*/ | ||
virtual bool InferShape(Scope *scope) override; |
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.
这些 bool 都改成 Error 吧
paddle/framework/net.cc
Outdated
Error PlainNet::InferShape(Scope* scope) { | ||
for (auto& op : ops_) { | ||
// wrong shape | ||
auto err = op.InferShape(); |
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.
We should not use Error
now, please use PADDLE_ENFORCE
instead.
Several interfaces may be needed: RNN need a proto or string as proto to create a void Serialize(NetDesc* net_desc) = 0 Forward or backward using void Forward() = 0;
void Backward() = 0; |
Do |
AddOptimizerOps should call after AddBackwardOps |
The AddBackwardOps will add all backward related operators. So, we have to find a way to tell the input and output variables of each backward operator. |
After a discussion, the current decision is as follows:
|
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.
LGM
check in for @Superjom 's rnn op dependency. |
No description provided.