Skip to content

Conversation

Yancey0623
Copy link
Contributor

Fixed #4434

const std::vector<std::string> &names = Inputs(name);
return names.size() > 0;
}
bool HasOutputs(const std::string &name) const {
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be inline

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Check var in scope, so we need a virtual function.

virtual bool HasInput(const std::string &name) const = 0;
virtual bool HasOutput(const std::string &name) const = 0;
bool HasInputs(const std::string &name) const {
const std::vector<std::string> &names = Inputs(name);
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to check if these variables are all in the scope~

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Member

@jacquesqiao jacquesqiao left a comment

Choose a reason for hiding this comment

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

LGTM!

@Yancey0623 Yancey0623 merged commit 2d8c7e3 into PaddlePaddle:develop Sep 30, 2017
@Yancey0623 Yancey0623 deleted the add_var_judgement branch September 30, 2017 04:10
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.

3 participants