Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,4 @@ List of Contributors
* [Max Kuhn](https://github.com/topepo)
* [Yuqi Li](https://github.com/ziyeqinghan)
* [Depeng Liang](https://github.com/Ldpe2G)
* [Kiko Qiu](https://github.com/kikoqiu)
6 changes: 3 additions & 3 deletions python/mxnet/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,6 @@ def predict(self, X, num_batch=None, return_data=False, reset=True):

i = 0
for batch in X:
if num_batch is not None and i == num_batch:
break
i += 1

_load_data(batch, data_arrays)
self._pred_exec.forward(is_train=False)
Expand All @@ -624,6 +621,9 @@ def predict(self, X, num_batch=None, return_data=False, reset=True):
data_list[j].append(x[0:real_size].asnumpy())
for j, x in enumerate(batch.label):
label_list[j].append(x[0:real_size].asnumpy())
i += 1
if num_batch is not None and i == num_batch:
break

outputs = [np.concatenate(x) for x in output_list]
if len(outputs) == 1:
Expand Down