Skip to content

Commit

Permalink
Add check for TFLite vesion in tests for logical ops
Browse files Browse the repository at this point in the history
* Check is added because of boolean dtype lack of support
  • Loading branch information
inadob committed Feb 4, 2020
1 parent 75436da commit 36351d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/python/frontend/tflite/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -978,8 +978,10 @@ def _test_forward_logical_or(data):
def test_all_logical():
data = [np.random.choice(a=[False, True], size=(2, 3, 4)).astype('bool'),
np.random.choice(a=[False, True], size=(2, 3, 4)).astype('bool')]
_test_forward_logical_and(data)
_test_forward_logical_or(data)
# boolean dtype is not supported by older versions than TFLite 1.15.0
if package_version.parse(tf.VERSION) >= package_version.parse('1.15.0'):
_test_forward_logical_and(data)
_test_forward_logical_or(data)

#######################################################################
# Zeros like
Expand Down

0 comments on commit 36351d8

Please sign in to comment.