Skip to content

Commit

Permalink
Updating name in unit test; adding error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
i-colbert committed Aug 1, 2023
1 parent 63d8bef commit 0f6eb2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/transformation/test_subpixel_to_deconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down

0 comments on commit 0f6eb2b

Please sign in to comment.