提交 6e5736e2 编写于 作者: F fengjiayi

fix a compile error

上级 4e517881
...@@ -20,7 +20,7 @@ class ReaderBase { ...@@ -20,7 +20,7 @@ class ReaderBase {
PADDLE_ENFORCE(!shapes_.empty()); PADDLE_ENFORCE(!shapes_.empty());
} }
// Read the next batch of data. (A 'batch' can be only one instance) // Read the next batch of data. (A 'batch' can be only one instance)
// If the next batch doesn't exist, the 'out' will be an empty std::vector. // If the next batch doesn't exist, the '*out' will be an empty std::vector.
virtual void ReadNext(std::vector<LoDTensor>* out) = 0; virtual void ReadNext(std::vector<LoDTensor>* out) = 0;
// Reinitialize the reader and read the file from the begin. // Reinitialize the reader and read the file from the begin.
......
...@@ -70,7 +70,7 @@ void BatchReader::ReadNext(std::vector<framework::LoDTensor>* out) { ...@@ -70,7 +70,7 @@ void BatchReader::ReadNext(std::vector<framework::LoDTensor>* out) {
for (int i = 0; i < batch_size_; ++i) { for (int i = 0; i < batch_size_; ++i) {
buffer_.push_back(std::vector<framework::LoDTensor>()); buffer_.push_back(std::vector<framework::LoDTensor>());
reader_->ReadNext(&buffer_.back()); reader_->ReadNext(&buffer_.back());
if (buffer.back().empty()) { if (buffer_.back().empty()) {
buffer_.pop_back(); buffer_.pop_back();
break; break;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册