@@ -1230,15 +1230,16 @@ def mkconst(desc, val, dtype=np.int64):
1230
1230
1231
1231
# support non 4D tensors and dynamic crop vals
1232
1232
# dynamic slice starts at opset 10
1233
- utils .make_sure (ctx .opset >= 10 , 'not -4D tensor or non-const pads require opset 10+' )
1233
+ utils .make_sure (ctx .opset >= 10 , 'non -4D tensor or non-const crops require opset 10+' )
1234
1234
1235
1235
input0 = node .input [0 ]
1236
1236
input2 = node .input [2 ]
1237
+
1238
+ # const vals
1237
1239
int_max_const = mkconst ('int_max' , np .array ([utils .get_max_value (np .int64 )]))
1238
1240
one_const = mkconst ('_const_one' , np .array ([1 ]))
1239
1241
minus1_const = mkconst ('_const_minus1' , np .array ([- 1 ]))
1240
1242
blocklen_resize_const = mkconst ('_const_blocklen_resize' , np .array ([- 1 , blocklen ]))
1241
-
1242
1243
blocklenplus1_const = mkconst ('_const_blocklenplus1' , np .array ([blocklen + 1 ]))
1243
1244
block_shape_const = mkconst ('_const_block_shape' , block_shape )
1244
1245
@@ -1357,17 +1358,17 @@ def mkconst(desc, val, dtype=np.int64):
1357
1358
1358
1359
# support non 4D tensors and dynamic pad vals
1359
1360
# dynamic slice starts at opset 10
1360
- utils .make_sure (ctx .opset >= 10 , 'not -4D tensor or non-const pads require opset 10+' )
1361
+ utils .make_sure (ctx .opset >= 10 , 'non -4D tensor or non-const pads require opset 10+' )
1361
1362
1362
1363
input0 = node .input [0 ]
1363
1364
input2 = node .input [2 ]
1365
+
1364
1366
# const vals
1365
1367
int_max_const = mkconst ('int_max' , np .array ([utils .get_max_value (np .int64 )]))
1366
1368
zero_const = mkconst ('_zero_const' , np .array ([0 ]))
1367
1369
one_const = mkconst ('_one_const' , np .array ([1 ]))
1368
1370
minus1_const = mkconst ('_minus1_const' , np .array ([- 1 ]))
1369
1371
blocklen_resize_const = mkconst ('_blocklen_resize_const' , np .array ([- 1 , blocklen ]))
1370
-
1371
1372
blocklenplus1_const = mkconst ('_blocklenplus1_const' , np .array ([blocklen + 1 ]))
1372
1373
filltop_const = mkconst ('_filltop_const' , np .array ([1 , 0 , 0 , 0 ]))
1373
1374
fillbottom_const = mkconst ('_bottom_const' , np .array ([0 , 0 , 1 , 0 ]))
0 commit comments