diff --git a/paddle/fluid/train/custom_trainer/feed/common/pipeline.h b/paddle/fluid/train/custom_trainer/feed/common/pipeline.h index 588b1bc2f30db95cb3fc2cccdfd91ed7ee5a7321..e1fe5c42a5836b270967f90cabf35e20ed587c14 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 c42c1c5977916958c843c66b629fb5ff1b796397..3a8e67227f69f3abd5c74fbb5d17ae4601d6b10c 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);