Skip to content

Commit 744cc41

Browse files
committed
fix a bug
1 parent ee4e567 commit 744cc41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

paddle/fluid/operators/reader/open_files_op.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class MultiFileReader : public framework::ReaderBase {
2727
const std::vector<framework::DDim>& dims, size_t thread_num,
2828
size_t buffer_size)
2929
: buffer_size_(buffer_size) {
30-
readers_.resize(file_names.size());
30+
readers_.reserve(file_names.size());
3131
for (const std::string& f_name : file_names) {
3232
readers_.emplace_back(CreateReaderByFileName(f_name, dims));
3333
}

0 commit comments

Comments
 (0)