From 7738bd084996139875966ed1c60694effe8c32ce Mon Sep 17 00:00:00 2001 From: cubehan3 Date: Tue, 26 Nov 2024 11:29:12 +0800 Subject: [PATCH] fixed bugs in gather test case (#2997) --- .../PaddleLT_new/layerApicase/math_sublayer/gather_0_func.py | 4 ++-- .../layerApicase/math_sublayer/gather_base_func.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/e2e/PaddleLT_new/layerApicase/math_sublayer/gather_0_func.py b/framework/e2e/PaddleLT_new/layerApicase/math_sublayer/gather_0_func.py index c3866fecfb..c94dd3bfaa 100644 --- a/framework/e2e/PaddleLT_new/layerApicase/math_sublayer/gather_0_func.py +++ b/framework/e2e/PaddleLT_new/layerApicase/math_sublayer/gather_0_func.py @@ -33,7 +33,7 @@ def create_tensor_inputs(): """ paddle tensor """ - inputs = (paddle.to_tensor(-1 + (1 - -1) * np.random.random([2, 3, 4, 4]).astype('float32'), dtype='float32', stop_gradient=False), ) + inputs = (paddle.to_tensor(-1 + (1 - -1) * np.random.random([3, 3, 4, 4]).astype('float32'), dtype='float32', stop_gradient=False), ) return inputs @@ -41,6 +41,6 @@ def create_numpy_inputs(): """ numpy array """ - inputs = (-1 + (1 - -1) * np.random.random([2, 3, 4, 4]).astype('float32'), ) + inputs = (-1 + (1 - -1) * np.random.random([3, 3, 4, 4]).astype('float32'), ) return inputs diff --git a/framework/e2e/PaddleLT_new/layerApicase/math_sublayer/gather_base_func.py b/framework/e2e/PaddleLT_new/layerApicase/math_sublayer/gather_base_func.py index 1e6830bfd8..6b400b10c0 100644 --- a/framework/e2e/PaddleLT_new/layerApicase/math_sublayer/gather_base_func.py +++ b/framework/e2e/PaddleLT_new/layerApicase/math_sublayer/gather_base_func.py @@ -33,7 +33,7 @@ def create_tensor_inputs(): """ paddle tensor """ - inputs = (paddle.to_tensor(-1 + (1 - -1) * np.random.random([2, 3, 4, 4]).astype('float32'), dtype='float32', stop_gradient=False), ) + inputs = (paddle.to_tensor(-1 + (1 - -1) * np.random.random([3, 3, 4, 4]).astype('float32'), dtype='float32', stop_gradient=False), ) return inputs @@ -41,6 +41,6 @@ def create_numpy_inputs(): """ numpy array """ - inputs = (-1 + (1 - -1) * np.random.random([2, 3, 4, 4]).astype('float32'), ) + inputs = (-1 + (1 - -1) * np.random.random([3, 3, 4, 4]).astype('float32'), ) return inputs