From 744cc412b779333f2869653d9c6d462fba3521eb Mon Sep 17 00:00:00 2001 From: fengjiayi Date: Mon, 4 Jun 2018 14:11:25 +0800 Subject: [PATCH] fix a bug --- paddle/fluid/operators/reader/open_files_op.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/operators/reader/open_files_op.cc b/paddle/fluid/operators/reader/open_files_op.cc index c0526e45f4d..2cbae8a90a9 100644 --- a/paddle/fluid/operators/reader/open_files_op.cc +++ b/paddle/fluid/operators/reader/open_files_op.cc @@ -27,7 +27,7 @@ class MultiFileReader : public framework::ReaderBase { const std::vector& dims, size_t thread_num, size_t buffer_size) : buffer_size_(buffer_size) { - readers_.resize(file_names.size()); + readers_.reserve(file_names.size()); for (const std::string& f_name : file_names) { readers_.emplace_back(CreateReaderByFileName(f_name, dims)); } -- GitLab