Skip to content

Commit

Permalink
BugFix with ParseInputDataType from LodTensorArray (#32918) (#32984)
Browse files Browse the repository at this point in the history
* BugFix with ParseInputDataType from LodTensorArray

* BugFix with ParseInputDataType from LodTensorArray
  • Loading branch information
Aurelius84 authored May 20, 2021
1 parent ef2ee5e commit 8ecaa8a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions paddle/fluid/framework/operator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1549,10 +1549,10 @@ void OperatorWithKernel::ParseInputDataType(
} else if (var->IsType<SelectedRows>()) {
t = &(var->Get<SelectedRows>().value());
} else if (var->IsType<LoDTensorArray>()) {
auto t_arr = var->Get<LoDTensorArray>();
for (size_t j = 0; j < t_arr.size(); j++) {
if (t_arr[j].IsInitialized()) {
t = &(t_arr[j]);
auto t_arr = &var->Get<LoDTensorArray>();
for (size_t j = 0; j < t_arr->size(); j++) {
if (t_arr->at(j).IsInitialized()) {
t = &(t_arr->at(j));
}
}
}
Expand Down

0 comments on commit 8ecaa8a

Please sign in to comment.