From 88dd55e99d2243c13a67fdae8db9c2243e9fa4db Mon Sep 17 00:00:00 2001 From: xiexionghang Date: Thu, 19 Sep 2019 13:52:46 +0800 Subject: [PATCH] for predetect download data --- paddle/fluid/train/custom_trainer/feed/common/pipeline.h | 2 +- .../fluid/train/custom_trainer/feed/process/learner_process.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/train/custom_trainer/feed/common/pipeline.h b/paddle/fluid/train/custom_trainer/feed/common/pipeline.h index 588b1bc2..e1fe5c42 100644 --- a/paddle/fluid/train/custom_trainer/feed/common/pipeline.h +++ b/paddle/fluid/train/custom_trainer/feed/common/pipeline.h @@ -116,7 +116,7 @@ private: } parsing_num += read_size; BthreadTaskRunner::instance().add_task( - [this, &parsing_num, read_size, input_data_buffer](){ + [this, &parsing_num, read_size, input_data_buffer]() { size_t write_size = 0; std::vector output_data_buffer(_options.batch_size); _converter(input_data_buffer->data(), read_size, diff --git a/paddle/fluid/train/custom_trainer/feed/process/learner_process.cc b/paddle/fluid/train/custom_trainer/feed/process/learner_process.cc index c42c1c59..3a8e6722 100755 --- a/paddle/fluid/train/custom_trainer/feed/process/learner_process.cc +++ b/paddle/fluid/train/custom_trainer/feed/process/learner_process.cc @@ -215,6 +215,7 @@ int LearnerProcess::run() { //Step1. 等待样本ready { ENVLOG_WORKER_MASTER_NOTICE(" %s, wait data ready:%s", epoch_log_title.c_str(), data_path.c_str()); + dataset->pre_detect_data(epoch_id); while (dataset->epoch_data_status(epoch_id) != DatasetStatus::Ready) { sleep(30); dataset->pre_detect_data(epoch_id); -- GitLab