From 0f6eb2b949cc459d0dffcb5fbad99079605adc96 Mon Sep 17 00:00:00 2001 From: icolbert Date: Tue, 1 Aug 2023 16:15:49 -0700 Subject: [PATCH] Updating name in unit test; adding error messages --- tests/transformation/test_subpixel_to_deconv.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/transformation/test_subpixel_to_deconv.py b/tests/transformation/test_subpixel_to_deconv.py index 5be346b7..821bc398 100644 --- a/tests/transformation/test_subpixel_to_deconv.py +++ b/tests/transformation/test_subpixel_to_deconv.py @@ -44,8 +44,8 @@ np.random.seed(0) -def test_subpixel_to_deconv_espcn(): - raw_m = get_data("qonnx.data", "onnx/bsd300x3-espcn/model.onnx") +def test_subpixel_to_deconv_float_espcn(): + raw_m = get_data("qonnx.data", "onnx/bsd300x3-espcn/float_model.onnx") model = ModelWrapper(raw_m) model = model.transform(InferShapes()) iname = model.graph.input[0].name @@ -57,9 +57,9 @@ def test_subpixel_to_deconv_espcn(): new_model = model.transform(SubPixelToDeconvolution()) # check that there are no DepthToSpace ops left op_types = list(map(lambda x: x.op_type, new_model.graph.node)) - assert "DepthToSpace" not in op_types + assert "DepthToSpace" not in op_types, "Error: the DepthToSpace nodes would be removed." produced = oxe.execute_onnx(new_model, input_dict)[oname] - assert np.isclose(expected, produced, atol=1e-4).all() + assert np.isclose(expected, produced, atol=1e-4).all(), "Error: expected output does not match the produced output." def create_subpixel_conv_model(