We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1cc28d commit 0dacbbeCopy full SHA for 0dacbbe
python/paddle/fluid/tests/unittests/test_multi_pass_reader.py
@@ -57,8 +57,12 @@ def test_main(self):
57
exe.run(fluid.default_startup_program())
58
59
batch_count = 0
60
- while not data_file.eof():
61
- img_val, = exe.run(fetch_list=[img])
+ while True:
+ try:
62
+ img_val, = exe.run(fetch_list=[img])
63
+ except fluid.core.EnforceNotMet as ex:
64
+ self.assertIn("There is no next data.", ex.message)
65
+ break
66
batch_count += 1
67
self.assertLessEqual(img_val.shape[0], self.batch_size)
68
data_file.reset()
0 commit comments