Skip to content

Commit ef90699

Browse files
authored
fix gather index out-of-bound error (#3066)
1 parent 6e06e1f commit ef90699

File tree

7 files changed

+14
-14
lines changed
  • framework/e2e/PaddleLT_new/layercase/sublayer1000/Det_cases
    • cascade_rcnn_cascade_mask_rcnn_r50_vd_fpn_ssld_1x_coco
    • faster_rcnn_faster_rcnn_swin_tiny_fpn_2x_coco
    • hrnet_faster_rcnn_hrnetv2p_w18_2x_coco
    • mask_rcnn_mask_rcnn_r50_fpn_2x_coco
    • ppyoloe_voc_ppyoloe_plus_crn_l_30e_voc
    • ppyoloe_voc_ppyoloe_plus_crn_s_30e_voc
    • smalldet_ppyoloe_plus_sod_crn_l_80e_coco

7 files changed

+14
-14
lines changed

framework/e2e/PaddleLT_new/layercase/sublayer1000/Det_cases/cascade_rcnn_cascade_mask_rcnn_r50_vd_fpn_ssld_1x_coco/SIR_145.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def create_inputspec():
5050
def create_tensor_inputs():
5151
inputs = (
5252
paddle.rand(shape=[4, 4], dtype=paddle.float32),
53-
paddle.randint(low=0, high=10, shape=[1], dtype=paddle.int32),
53+
paddle.randint(low=0, high=4, shape=[1], dtype=paddle.int32),
5454
paddle.rand(shape=[1, 256, 176, 264], dtype=paddle.float32),
5555
paddle.rand(shape=[1, 256, 88, 132], dtype=paddle.float32),
5656
paddle.rand(shape=[1, 256, 44, 66], dtype=paddle.float32),
@@ -62,7 +62,7 @@ def create_tensor_inputs():
6262
def create_numpy_inputs():
6363
inputs = (
6464
np.random.random(size=[4, 4]).astype('float32'),
65-
np.random.randint(low=0, high=10, size=[1], dtype='int32'),
65+
np.random.randint(low=0, high=4, size=[1], dtype='int32'),
6666
np.random.random(size=[1, 256, 176, 264]).astype('float32'),
6767
np.random.random(size=[1, 256, 88, 132]).astype('float32'),
6868
np.random.random(size=[1, 256, 44, 66]).astype('float32'),

framework/e2e/PaddleLT_new/layercase/sublayer1000/Det_cases/faster_rcnn_faster_rcnn_swin_tiny_fpn_2x_coco/SIR_116.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def create_inputspec():
4141

4242
def create_tensor_inputs():
4343
inputs = (
44-
paddle.randint(low=0, high=10, shape=[1002], dtype=paddle.int64),
44+
paddle.randint(low=0, high=2, shape=[1002], dtype=paddle.int64),
4545
paddle.randint(low=0, high=10, shape=[1002], dtype=paddle.int32),
4646
paddle.randint(low=0, high=10, shape=[2], dtype=paddle.int32),
4747
)
@@ -50,7 +50,7 @@ def create_tensor_inputs():
5050

5151
def create_numpy_inputs():
5252
inputs = (
53-
np.random.randint(low=0, high=10, size=[1002], dtype="int64"),
53+
np.random.randint(low=0, high=2, size=[1002], dtype="int64"),
5454
np.random.randint(low=0, high=10, size=[1002], dtype="int32"),
5555
np.random.randint(low=0, high=10, size=[2], dtype="int32"),
5656
)

framework/e2e/PaddleLT_new/layercase/sublayer1000/Det_cases/hrnet_faster_rcnn_hrnetv2p_w18_2x_coco/SIR_60.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def create_inputspec():
4040

4141
def create_tensor_inputs():
4242
inputs = (
43-
paddle.randint(low=0, high=10, shape=[2002], dtype=paddle.int64),
43+
paddle.randint(low=0, high=2, shape=[2002], dtype=paddle.int64),
4444
paddle.randint(low=0, high=10, shape=[2002], dtype=paddle.int32),
4545
paddle.randint(low=0, high=10, shape=[2], dtype=paddle.int32),
4646
)
@@ -49,7 +49,7 @@ def create_tensor_inputs():
4949

5050
def create_numpy_inputs():
5151
inputs = (
52-
np.random.randint(low=0, high=10, size=[2002], dtype="int64"),
52+
np.random.randint(low=0, high=2, size=[2002], dtype="int64"),
5353
np.random.randint(low=0, high=10, size=[2002], dtype="int32"),
5454
np.random.randint(low=0, high=10, size=[2], dtype="int32"),
5555
)

framework/e2e/PaddleLT_new/layercase/sublayer1000/Det_cases/mask_rcnn_mask_rcnn_r50_fpn_2x_coco/SIR_109.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def create_inputspec():
5050
def create_tensor_inputs():
5151
inputs = (
5252
paddle.rand(shape=[3, 4], dtype=paddle.float32),
53-
paddle.randint(low=0, high=10, shape=[1], dtype=paddle.int32),
53+
paddle.randint(low=0, high=3, shape=[1], dtype=paddle.int32),
5454
paddle.rand(shape=[1, 256, 168, 256], dtype=paddle.float32),
5555
paddle.rand(shape=[1, 256, 84, 128], dtype=paddle.float32),
5656
paddle.rand(shape=[1, 256, 42, 64], dtype=paddle.float32),
@@ -62,7 +62,7 @@ def create_tensor_inputs():
6262
def create_numpy_inputs():
6363
inputs = (
6464
np.random.random(size=[3, 4]).astype('float32'),
65-
np.random.randint(low=0, high=10, size=[1], dtype='int32'),
65+
np.random.randint(low=0, high=3, size=[1], dtype='int32'),
6666
np.random.random(size=[1, 256, 168, 256]).astype('float32'),
6767
np.random.random(size=[1, 256, 84, 128]).astype('float32'),
6868
np.random.random(size=[1, 256, 42, 64]).astype('float32'),

framework/e2e/PaddleLT_new/layercase/sublayer1000/Det_cases/ppyoloe_voc_ppyoloe_plus_crn_l_30e_voc/SIR_182.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def create_inputspec():
6868
def create_tensor_inputs():
6969
inputs = (
7070
paddle.rand(shape=[1, 1, 4116], dtype=paddle.float32),
71-
paddle.randint(low=0, high=10, shape=[1, 1], dtype=paddle.int64),
71+
paddle.zeros(shape=[1, 1], dtype=paddle.int64),
7272
paddle.randint(low=0, high=10, shape=[1, 1, 1], dtype=paddle.int32),
7373
paddle.rand(shape=[1, 4116], dtype=paddle.float32),
7474
paddle.rand(shape=[1, 1, 4], dtype=paddle.float32),
@@ -81,7 +81,7 @@ def create_tensor_inputs():
8181
def create_numpy_inputs():
8282
inputs = (
8383
np.random.random(size=[1, 1, 4116]).astype("float32"),
84-
np.random.randint(low=0, high=10, size=[1, 1], dtype="int64"),
84+
np.zeros(shape=[1, 1], dtype="int64"),
8585
np.random.randint(low=0, high=10, size=[1, 1, 1], dtype="int32"),
8686
np.random.random(size=[1, 4116]).astype("float32"),
8787
np.random.random(size=[1, 1, 4]).astype("float32"),

framework/e2e/PaddleLT_new/layercase/sublayer1000/Det_cases/ppyoloe_voc_ppyoloe_plus_crn_s_30e_voc/SIR_179.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def create_inputspec():
6767
def create_tensor_inputs():
6868
inputs = (
6969
paddle.rand(shape=[1, 1, 2100], dtype=paddle.float32),
70-
paddle.randint(low=0, high=10, shape=[1, 1], dtype=paddle.int64),
70+
paddle.zeros(shape=[1, 1], dtype=paddle.int64),
7171
paddle.randint(low=0, high=10, shape=[1, 1, 1], dtype=paddle.int32),
7272
paddle.rand(shape=[1, 2100], dtype=paddle.float32),
7373
paddle.rand(shape=[1, 1, 4], dtype=paddle.float32),
@@ -80,7 +80,7 @@ def create_tensor_inputs():
8080
def create_numpy_inputs():
8181
inputs = (
8282
np.random.random(size=[1, 1, 2100]).astype("float32"),
83-
np.random.randint(low=0, high=10, size=[1, 1], dtype="int64"),
83+
np.zeros(shape=[1, 1], dtype="int64"),
8484
np.random.randint(low=0, high=10, size=[1, 1, 1], dtype="int32"),
8585
np.random.random(size=[1, 2100]).astype("float32"),
8686
np.random.random(size=[1, 1, 4]).astype("float32"),

framework/e2e/PaddleLT_new/layercase/sublayer1000/Det_cases/smalldet_ppyoloe_plus_sod_crn_l_80e_coco/SIR_174.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def create_inputspec():
6767
def create_tensor_inputs():
6868
inputs = (
6969
paddle.rand(shape=[1, 2, 3549], dtype=paddle.float32),
70-
paddle.randint(low=0, high=10, shape=[1, 1], dtype=paddle.int64),
70+
paddle.zeros(shape=[1, 1], dtype=paddle.int64),
7171
paddle.randint(low=0, high=10, shape=[1, 2, 1], dtype=paddle.int32),
7272
paddle.rand(shape=[1, 3549], dtype=paddle.float32),
7373
paddle.rand(shape=[1, 2, 4], dtype=paddle.float32),
@@ -80,7 +80,7 @@ def create_tensor_inputs():
8080
def create_numpy_inputs():
8181
inputs = (
8282
np.random.random(size=[1, 2, 3549]).astype("float32"),
83-
np.random.randint(low=0, high=10, size=[1, 1], dtype="int64"),
83+
np.zeros(shape=[1, 1], dtype="int64"),
8484
np.random.randint(low=0, high=10, size=[1, 2, 1], dtype="int32"),
8585
np.random.random(size=[1, 3549]).astype("float32"),
8686
np.random.random(size=[1, 2, 4]).astype("float32"),

0 commit comments

Comments
 (0)