Commit 263fdff 1 parent 2226ecc commit 263fdff Copy full SHA for 263fdff
File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ def test_inline_model_custom_node_nested(old_squeeze: onnx.ModelProto):
238
238
build ({"a" : a }, {"c" : c })
239
239
240
240
241
- def test_if_adaptation_const ():
241
+ def test_if_adapatation_squeeze ():
242
242
cond = argument (Tensor (numpy .bool_ , ()))
243
243
b = argument (Tensor (numpy .float32 , (1 ,)))
244
244
squeezed = Squeeze11 .squeeze11 (b , [0 ])
@@ -255,3 +255,11 @@ def test_if_adaptation_const():
255
255
out = ort .InferenceSession (model .SerializeToString ()).run (
256
256
None , {"b" : b , "cond" : cond }
257
257
)
258
+
259
+
260
+ def test_if_adaptation_const ():
261
+ sq = op19 .const (1.1453 , dtype = numpy .float32 )
262
+ b = argument (Tensor (numpy .float32 , ("N" ,)))
263
+ cond = op18 .equal (sq , b )
264
+ out = op18 .if_ (cond , then_branch = lambda : [sq ], else_branch = lambda : [sq ])
265
+ build ({"b" : b }, {"out" : out [0 ]})
You can’t perform that action at this time.
0 commit comments