Thursday 15 July 2021

How to compare numpy array between two variables?

         # only compare part of results
        assert np.allclose(
            pytorch_result, onnx_result,
            atol=1.e-5), 'The outputs are different between Pytorch and ONNX'
        print('The numerical values are same between Pytorch and ONNX')

No comments:

Post a Comment