提交 744cc412 编写于 作者: F fengjiayi

fix a bug

上级 ee4e567d
...@@ -27,7 +27,7 @@ class MultiFileReader : public framework::ReaderBase { ...@@ -27,7 +27,7 @@ class MultiFileReader : public framework::ReaderBase {
const std::vector<framework::DDim>& dims, size_t thread_num, const std::vector<framework::DDim>& dims, size_t thread_num,
size_t buffer_size) size_t buffer_size)
: buffer_size_(buffer_size) { : buffer_size_(buffer_size) {
readers_.resize(file_names.size()); readers_.reserve(file_names.size());
for (const std::string& f_name : file_names) { for (const std::string& f_name : file_names) {
readers_.emplace_back(CreateReaderByFileName(f_name, dims)); readers_.emplace_back(CreateReaderByFileName(f_name, dims));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册