Skip to content

Commit 297cbeb

Browse files
authored
Merge pull request #12439 from jacquesqiao/CheckTensorNANOrInf-support-selectedrows
CheckTensorNANOrInf support checking SelectedRows
2 parents 39ac9e3 + 3033841 commit 297cbeb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

paddle/fluid/framework/operator.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,8 @@ void OperatorWithKernel::RunImpl(const Scope& scope,
679679
if (var == nullptr) continue;
680680
if (var->IsType<framework::LoDTensor>()) {
681681
CheckTensorNANOrInf(vname, var->Get<framework::LoDTensor>());
682+
} else if (var->IsType<framework::SelectedRows>()) {
683+
CheckTensorNANOrInf(vname, var->Get<framework::SelectedRows>().value());
682684
}
683685
}
684686
}

0 commit comments

Comments
 (0)