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

add op type in check nan/inf #15986

Merged
merged 2 commits into from
Mar 1, 2019

Conversation

seiriosPlus
Copy link
Collaborator

No description provided.

@seiriosPlus seiriosPlus requested review from chengduoZH, panyx0718 and typhoonzero and removed request for chengduoZH and panyx0718 February 28, 2019 11:07
typhoonzero
typhoonzero previously approved these changes Feb 28, 2019
@@ -882,7 +882,8 @@ class RuntimeInferShapeContext : public InferShapeContext {
const RuntimeContext& ctx_;
};

static void CheckTensorNANOrInf(const std::string& name,
static void CheckTensorNANOrInf(const std::string& type,
Copy link
Contributor

Choose a reason for hiding this comment

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

name it op_type should be easy to read

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done.

} else if (var->IsType<framework::SelectedRows>()) {
CheckTensorNANOrInf(vname, var->Get<framework::SelectedRows>().value());
CheckTensorNANOrInf(type_, vname,
var->Get<framework::SelectedRows>().value());
Copy link
Contributor

Choose a reason for hiding this comment

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

In fact, if we set the FLAGS_check_nan_inf=1 and GLOG_vmodule=operator=4, we can know the nan/inf is happend in which op.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, I'm agreed. But it may print much more logs I will not expect.

@seiriosPlus seiriosPlus merged commit 6d5a04c into PaddlePaddle:develop Mar 1, 2019
ceci3 pushed a commit to ceci3/Paddle that referenced this pull request Mar 4, 2019
* add op name in check nan/inf, test=develop
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