From 93a2b317f72861cd08fa22850c69fdec769d0747 Mon Sep 17 00:00:00 2001 From: jiaqi <173596896@qq.com> Date: Sat, 29 Jun 2019 15:50:42 +0800 Subject: [PATCH] fix data feed ptr error (#18419) fix data feed ptr runtime error, pipeline trainer will core in some cases, so set it nullptr as default value. --- paddle/fluid/framework/device_worker.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/framework/device_worker.h b/paddle/fluid/framework/device_worker.h index 035392ef318..8c91a5b9bf4 100644 --- a/paddle/fluid/framework/device_worker.h +++ b/paddle/fluid/framework/device_worker.h @@ -119,9 +119,9 @@ class DeviceWorker { } protected: - Scope* root_scope_; + Scope* root_scope_ = nullptr; paddle::platform::Place place_; - DataFeed* device_reader_; + DataFeed* device_reader_ = nullptr; int64_t batch_num_; FetchConfig fetch_config_; bool use_cvm_; -- GitLab