From 6787d7494f8815bce9523906935169f6385b9d93 Mon Sep 17 00:00:00 2001 From: SebastianBoblestETAS <73823717+SebastianBoblestETAS@users.noreply.github.com> Date: Fri, 22 Jan 2021 14:56:18 +0100 Subject: [PATCH] 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 dec0e9842a37..87ea3be1436a 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]