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

Dctor cache

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