You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/02/19 11:38:18 UTC
[GitHub] [incubator-tvm] inadob opened a new pull request #4913:
[Frontend][TFLite] Fix tests for tflite unary elemwise operations
inadob opened a new pull request #4913: [Frontend][TFLite] Fix tests for tflite unary elemwise operations
URL: https://github.com/apache/incubator-tvm/pull/4913
Previously these tests were passing just because they weren't run at all
- 'test_op' name was not checked properly
- the generated NumPy data wasn't passed to any function
- all the operations don't support int32 type
- ceil and cos come with the TFL 1.14.0.post1 schema so I added a check
Also, I added an error message for TFL operators that aren't existing in the current fbs schema.
Can you please take a look: @anijain2305 @jackwish @FrozenGene
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-tvm] FrozenGene commented on issue #4913:
[Frontend][TFLite] Fix tests for tflite unary elemwise operations
Posted by GitBox <gi...@apache.org>.
FrozenGene commented on issue #4913: [Frontend][TFLite] Fix tests for tflite unary elemwise operations
URL: https://github.com/apache/incubator-tvm/pull/4913#issuecomment-588903942
@inadob Seems our CI has some problem. Could you upload one commit and trigger the CI again? Thanks.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-tvm] wyc-ruiker commented on a change in pull request
#4913: [Frontend][TFLite] Fix tests for tflite unary elemwise operations
Posted by GitBox <gi...@apache.org>.
wyc-ruiker commented on a change in pull request #4913: [Frontend][TFLite] Fix tests for tflite unary elemwise operations
URL: https://github.com/apache/incubator-tvm/pull/4913#discussion_r381283571
##########
File path: tests/python/frontend/tflite/test_forward.py
##########
@@ -745,24 +745,24 @@ def _test_neg(data):
def _test_forward_unary_elemwise(test_op):
# functions that need positive input
- if test_op in {'_test_log', '_test_sqrt', '_test_rsqrt'}:
- test_op(np.arange(6.0, dtype=np.float32).reshape((2, 1, 3)))
- test_op(np.arange(6.0, dtype=np.int32).reshape((2, 1, 3)))
+ if test_op.__name__ in {'_test_log', '_test_sqrt', '_test_rsqrt'}:
+ test_op(np.arange(1.0, 7.0, dtype=np.float32).reshape((2, 1, 3)))
else:
- np.array(np.random.uniform(-5, 5, (3, 1)), dtype=np.int32)
+ test_op(np.random.uniform(-10, 10, (3, 2)).astype(np.float32))
def test_all_unary_elemwise():
_test_forward_unary_elemwise(_test_abs)
- _test_forward_unary_elemwise(_test_ceil)
_test_forward_unary_elemwise(_test_floor)
_test_forward_unary_elemwise(_test_exp)
_test_forward_unary_elemwise(_test_log)
_test_forward_unary_elemwise(_test_sin)
- _test_forward_unary_elemwise(_test_cos)
_test_forward_unary_elemwise(_test_sqrt)
_test_forward_unary_elemwise(_test_rsqrt)
_test_forward_unary_elemwise(_test_neg)
-
+ # ceil and cos come with TFLite 1.14.0.post1 fbs schema
+ if package_version.parse(tf.VERSION) >= package_version.parse('1.14.0'):
+ _test_forward_unary_elemwise(_test_ceil)
+ _test_forward_unary_elemwise(_test_cos)
#######################################################################
Review comment:
need a line feed between these two lines
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-tvm] FrozenGene merged pull request #4913:
[Frontend][TFLite] Fix tests for tflite unary elemwise operations
Posted by GitBox <gi...@apache.org>.
FrozenGene merged pull request #4913: [Frontend][TFLite] Fix tests for tflite unary elemwise operations
URL: https://github.com/apache/incubator-tvm/pull/4913
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-tvm] FrozenGene commented on issue #4913:
[Frontend][TFLite] Fix tests for tflite unary elemwise operations
Posted by GitBox <gi...@apache.org>.
FrozenGene commented on issue #4913: [Frontend][TFLite] Fix tests for tflite unary elemwise operations
URL: https://github.com/apache/incubator-tvm/pull/4913#issuecomment-589489025
Thanks @inadob @wyc-ruiker merged.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services