Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Verify result image in example by hash
Browse files Browse the repository at this point in the history
Signed-off-by: Acharya <aanirud@8c85904b0bf4.ant.amazon.com>
  • Loading branch information
Acharya committed Mar 13, 2018
1 parent 612e2a6 commit 57386f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/python-pytest/onnx/onnx_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import os
import unittest
import logging
import hashlib
import numpy as np
import numpy.testing as npt
from onnx import helper
Expand Down Expand Up @@ -127,6 +128,8 @@ def test_super_resolution_example():
input_image, img_cb, img_cr = super_resolution.get_test_image()
result_img = super_resolution.perform_inference(sym, params, input_image,
img_cb, img_cr)

assert hashlib.md5(result_img.tobytes()).hexdigest() == '0d98393a49b1d9942106a2ed89d1e854'
assert result_img.size == (output_img_dim, output_img_dim)

if __name__ == '__main__':
Expand Down

0 comments on commit 57386f2

Please sign in to comment.