fix a bug in reset_tensor_array, test=develop (#29620)

* fix a bug in reset_tensor_array, test=develop

* ci coverage, test=develop
revert-31562-mean
石晓伟 4 years ago committed by GitHub
parent 3d1741b794
commit acb5e86363
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -38,8 +38,14 @@ struct TensorArrayBatchCleaner {
constexpr auto kTensorId = framework::VarTypeTrait<framework::Tensor>::kId;
constexpr auto kLoDTensorId =
framework::VarTypeTrait<framework::LoDTensor>::kId;
constexpr auto kSelectedRowsId =
framework::VarTypeTrait<framework::SelectedRows>::kId;
constexpr auto kFetchListId =
framework::VarTypeTrait<framework::FetchList>::kId;
valid_types_.insert(kTensorId);
valid_types_.insert(kLoDTensorId);
valid_types_.insert(kSelectedRowsId);
valid_types_.insert(kFetchListId);
}
// Collect the variables that are not Tensor or LoDTensor, and reset them to a
// bool(trick), because some of them are containers, and some operators just

Loading…
Cancel
Save