Skip to content

Commit 0d2d419

Browse files
committed
Follow comments
1 parent d5365bb commit 0d2d419

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

demo/mnist/api_train_v2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def event_handler(event):
113113
test_creator = paddle.dataset.mnist.test()
114114
test_data = []
115115
for item in test_creator():
116-
test_data.append(item[0])
116+
test_data.append((item[0], ))
117117
if len(test_data) == 100:
118118
break
119119

python/paddle/v2/inference.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,7 @@ def iter_infer(self,
4343

4444
def __reader_impl__():
4545
for each_sample in input:
46-
if len(reader_dict) == 1:
47-
yield [each_sample]
48-
else:
49-
yield each_sample
46+
yield each_sample
5047

5148
reader = minibatch.batch(__reader_impl__, batch_size=batch_size)
5249
else:

0 commit comments

Comments
 (0)