tflite-support
tflite-support copied to clipboard
Migrate away from assertDeepAlmostEqual
The reason to use tf.test, is to be able to use https://www.tensorflow.org/api_docs/python/tf/test/TestCase#assertProtoEquals instead of our own implementation.
@kinaryml Could you investigate if you can migrate away from using assertDeepAlmostEqual?
@khanhlvg A testing module in TFDS also seems to use a similar variant of assertDeepAlmostEqual here FYI.
I believe it should be fine to use the function since another TF library uses it too.
On a side note, I've also opened a branch that uses assertProtoEquals to compare results here.
@kinaryml I've merged #784 with some minor changes. I migrated back to use the mock in the unittest module because the one in TF is an internal API that we aren't supposed to access. Could you merge the latest changes into your branch, resolve conflict and raise a PR? Thanks!
@khanhlvg I've created yet another branch here instead and we can review the changes. This should have all the conflicts resolved.
Thanks Kinar! The changes look good to me. Could you send a PR to the main tflite-support repo so that I can import it and test on internal build system?
@khanhlvg I've raised a PR for it in the main tflite-support repo now. PTAL here.