提交 e40905da 编写于 作者: S sneaxiy

Merge branch 'complete_py_reader_python' of https://github.com/sneaxiy/Paddle...

Merge branch 'complete_py_reader_python' of https://github.com/sneaxiy/Paddle into complete_py_reader_python
......@@ -313,8 +313,8 @@ All parameter, weight, gradient are variables in Paddle.
})
.def("size", &LoDTensorBlockingQueue::Size)
.def("capacity", &LoDTensorBlockingQueue::Cap)
.def("push_eof", &LoDTensorBlockingQueue::Close)
.def("is_eof", &LoDTensorBlockingQueue::IsClosed);
.def("close", &LoDTensorBlockingQueue::Close)
.def("is_closed", &LoDTensorBlockingQueue::IsClosed);
m.def("init_lod_tensor_blocking_queue",
[](Variable &var, size_t capacity,
......
......@@ -456,7 +456,7 @@ def py_reader(capacity, shapes, lod_levels, dtypes):
Variable would invoke `pop()` method of the queue to retrieve the
feeding data. The process of feeding data in Python side and fetching
data in C++ side can run in parallel. The BlockingQueue should be closed
using `push_eof()` method when unused.
using `close()` method when unused.
Args:
capacity(int): The maximum capacity of the BlockingQueue.
......
......@@ -81,7 +81,7 @@ class TestPyReader(unittest.TestCase):
self.outputs.append(
executor.run(fetch_list=list(read_out_data)))
feed_queue.push_eof()
feed_queue.close()
self.validate()
def validate(self):
......
......@@ -184,7 +184,7 @@ class TestPyReaderUsingExecutor(unittest.TestCase):
fetches = [as_numpy(fetch) for fetch in fetches]
self.outputs.append(fetches)
feed_queue.push_eof()
feed_queue.close()
self.validate()
def validate(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册