Skip to content

Commit 07a5f7f

Browse files
committed
Add test cases: test_resize_dynamic_roi_noninteger_scales_3d_anisotropic
1 parent b7761d4 commit 07a5f7f

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

‎tests/python/relax/test_frontend_onnx.py‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4130,6 +4130,29 @@ def test_resize_dynamic_roi_noninteger_scales_2d():
41304130
check_correctness(helper.make_model(graph), opset=18)
41314131

41324132

4133+
def test_resize_dynamic_roi_noninteger_scales_3d_anisotropic():
4134+
resize_node = helper.make_node(
4135+
"Resize",
4136+
["X", "roi", "scales"],
4137+
["Y"],
4138+
mode="linear",
4139+
coordinate_transformation_mode="asymmetric",
4140+
)
4141+
graph = helper.make_graph(
4142+
[resize_node],
4143+
"resize_dynamic_roi_noninteger_3d_anisotropic",
4144+
inputs=[
4145+
helper.make_tensor_value_info("X", TensorProto.FLOAT, [1, 1, 3, 5, 7]),
4146+
helper.make_tensor_value_info("roi", TensorProto.FLOAT, [10]),
4147+
],
4148+
initializer=[
4149+
helper.make_tensor("scales", TensorProto.FLOAT, [5], [1.0, 1.0, 1.5, 2.5, 3.5])
4150+
],
4151+
outputs=[helper.make_tensor_value_info("Y", TensorProto.FLOAT, [1, 1, 4, 12, 24])],
4152+
)
4153+
check_correctness(helper.make_model(graph), opset=18)
4154+
4155+
41334156
def test_resize_asymmetric_nearest_noninteger_scales_2d():
41344157
"""Asymmetric+nearest+floor optimization must not ignore scale override.
41354158

0 commit comments

Comments
 (0)