File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
paddle/fluid/operators/reader
python/paddle/fluid/tests/demo Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ class DoubleBufferReader : public framework::DecoratedReader {
52
52
53
53
void ReadNextImpl (std::vector<framework::LoDTensor>* out) override ;
54
54
55
+ ~DoubleBufferReader () { Shutdown (); }
56
+
55
57
private:
56
58
void ShutdownImpl () override {
57
59
reader_->Shutdown ();
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ def main():
100
100
trainer .run (fetch_list = [loss .name ]))
101
101
except fluid .core .EOFException :
102
102
print 'End of epoch' , epoch_id
103
- # train_reader.reset()
103
+ train_reader .reset ()
104
104
train_data_thread .join ()
105
105
106
106
test_data_thread = pipe_reader_to_queue (
@@ -111,7 +111,7 @@ def main():
111
111
tester .run (fetch_list = [test_loss .name ]))
112
112
except fluid .core .EOFException :
113
113
print 'End of testing'
114
- # test_reader.reset()
114
+ test_reader .reset ()
115
115
116
116
test_data_thread .join ()
117
117
break
You can’t perform that action at this time.
0 commit comments