From 664be756185923b96e8da79261073c461ae84298 Mon Sep 17 00:00:00 2001 From: barrierye Date: Tue, 20 Nov 2018 15:10:06 +0800 Subject: [PATCH] update data_feed for add MultiSlotDataFeed --- paddle/fluid/framework/data_feed.cc | 4 ++-- paddle/fluid/framework/data_feed.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/framework/data_feed.cc b/paddle/fluid/framework/data_feed.cc index 89f3ec79212..e4255101dca 100755 --- a/paddle/fluid/framework/data_feed.cc +++ b/paddle/fluid/framework/data_feed.cc @@ -155,7 +155,7 @@ void MultiSlotDataFeed::Init(paddle::framework::DataFeedDesc& data_feed_desc) { finish_init_ = false; finish_set_filelist_ = false; finish_start_ = false; - /* + if (!data_feed_desc.has_multi_slot_desc()){ LOG(ERROR) << "error: multi_slot_desc has not been set"; exit(-1); @@ -178,7 +178,7 @@ void MultiSlotDataFeed::Init(paddle::framework::DataFeedDesc& data_feed_desc) { } } feed_vec_.resize(use_slots_.size()); - */ + finish_init_ = true; } diff --git a/paddle/fluid/framework/data_feed.h b/paddle/fluid/framework/data_feed.h index 42dcb7abe0b..388925b5af4 100755 --- a/paddle/fluid/framework/data_feed.h +++ b/paddle/fluid/framework/data_feed.h @@ -176,8 +176,8 @@ class DataFeed { LOG(ERROR) << "error: The function SetBufferSize is not implemented"; exit(-1); } - virtual const std::vector& GetAllSlots() {return all_slots_;} - virtual const std::vector& GetUseSlots() {return use_slots_;} + virtual const std::vector& GetAllSlotAlias() {return all_slots_;} + virtual const std::vector& GetUseSlotAlias() {return use_slots_;} std::vector& GetFeedVec() {return feed_vec_;} virtual void AddFeedVar(Variable* var, const std::string& name); protected: -- GitLab