From e2f878e4e64b368407c4970f64620d5596cf580f Mon Sep 17 00:00:00 2001 From: Sebastian Boblest Date: Fri, 22 Jan 2021 09:37:56 +0100 Subject: [PATCH] get_top_results works on a copy of output --- 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]