From 164275704da3863fba2778219ff267c79ccf2504 Mon Sep 17 00:00:00 2001 From: 123malin Date: Mon, 25 Jan 2021 15:58:53 +0800 Subject: [PATCH] test=develop, fix nonzero astuple=true (#30647) --- python/paddle/tensor/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/paddle/tensor/search.py b/python/paddle/tensor/search.py index 32f7bf373bb..95f8fa449bd 100644 --- a/python/paddle/tensor/search.py +++ b/python/paddle/tensor/search.py @@ -399,7 +399,7 @@ def nonzero(x, as_tuple=False): for i in range(rank): list_out.append( layers.slice( - outs, axes=[rank - 1], starts=[i], ends=[i + 1])) + outs, axes=[1], starts=[i], ends=[i + 1])) return tuple(list_out) -- GitLab