Dctor cache

guochaorong-patch-1
yuyang18 7 years ago
parent ee7d8b4d66
commit c9cf2bdb9c
No known key found for this signature in database
GPG Key ID: 6DFF29878217BE5F

@ -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

Loading…
Cancel
Save