You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2021/01/22 13:56:39 UTC

[tvm] branch main updated: get_top_results works on a copy of output (#7327)

This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 6787d74  get_top_results works on a copy of output (#7327)
6787d74 is described below

commit 6787d7494f8815bce9523906935169f6385b9d93
Author: SebastianBoblestETAS <73...@users.noreply.github.com>
AuthorDate: Fri Jan 22 14:56:18 2021 +0100

    get_top_results works on a copy of output (#7327)
---
 python/tvm/driver/tvmc/runner.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/tvm/driver/tvmc/runner.py b/python/tvm/driver/tvmc/runner.py
index dec0e98..87ea3be 100644
--- a/python/tvm/driver/tvmc/runner.py
+++ b/python/tvm/driver/tvmc/runner.py
@@ -427,7 +427,7 @@ def get_top_results(outputs, max_results):
         The first row is the indices and the second is the values.
 
     """
-    output = outputs["output_0"]
+    output = np.copy(outputs["output_0"])
     sorted_labels = output.argsort()[0][-max_results:][::-1]
     output.sort()
     sorted_values = output[0][-max_results:][::-1]