Skip to content

Commit 3033841

Browse files
committed
CheckTensorNANOrInf support checking SelectedRows
1 parent 02c3145 commit 3033841

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)