未验证 提交 c9cf2bdb 编写于 作者: Y yuyang18

Dctor cache

上级 ee7d8b4d
......@@ -52,6 +52,8 @@ class DoubleBufferReader : public framework::DecoratedReader {
void ReadNextImpl(std::vector<framework::LoDTensor>* out) override;
~DoubleBufferReader() { Shutdown(); }
private:
void ShutdownImpl() override {
reader_->Shutdown();
......
......@@ -100,7 +100,7 @@ def main():
trainer.run(fetch_list=[loss.name]))
except fluid.core.EOFException:
print 'End of epoch', epoch_id
# train_reader.reset()
train_reader.reset()
train_data_thread.join()
test_data_thread = pipe_reader_to_queue(
......@@ -111,7 +111,7 @@ def main():
tester.run(fetch_list=[test_loss.name]))
except fluid.core.EOFException:
print 'End of testing'
# test_reader.reset()
test_reader.reset()
test_data_thread.join()
break
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册