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/11/24 02:37:58 UTC

[GitHub] [incubator-tvm] alter-xp commented on a change in pull request #6949: [TF frontend] add support for StridedSlice to input a single constant

alter-xp commented on a change in pull request #6949:
URL: https://github.com/apache/incubator-tvm/pull/6949#discussion_r529162488



##########
File path: python/tvm/relay/frontend/tensorflow.py
##########
@@ -1599,6 +1599,9 @@ def _impl(inputs, attr, params, mod):
         data_shape = get_const_tuple(in_type.checked_type.shape)
         data_dim = len(data_shape)
         stride_dim = len(stride)
+        if data_dim == 0 and isinstance(inputs[0], _expr.Constant):

Review comment:
       Maybe I didn't describe it clearly, the input here is a single number. So `data_dim` here is 0. This situation is the same as `np.array(1)`. `len(np.array(1).shape) == 0`




----------------------------------------------------------------
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