yongwww commented on a change in pull request #5699: URL: https://github.com/apache/incubator-tvm/pull/5699#discussion_r439130129
########## File path: python/tvm/relay/frontend/tensorflow.py ########## @@ -1177,18 +1137,26 @@ def _impl(inputs, attr, params, mod): except (IndexError, KeyError, AttributeError): # Handle symbolic begin try: - begin = _infer_value(inputs[1], params).asnumpy().tolist() + begin = _infer_value(inputs[1], params, mod).asnumpy().tolist() except Exception: begin = inputs[1] try: size = _get_list_param(params, inputs[2]) except (IndexError, KeyError, AttributeError): # Handle symbolic size try: - size = _infer_value(inputs[2], params).asnumpy().tolist() + size = _infer_value(inputs[2], params, mod).asnumpy().tolist() except Exception: size = inputs[2] - return _op.strided_slice(inputs[0], begin=begin, end=size, slice_mode="size") + + # Align begin and strides for dynamic shape. + data_dim = len(_infer_shape(inputs[0], mod)) + strides = [1] * data_dim + if not isinstance(begin, (_expr.Call, _expr.Var)): + for _ in range(len(begin), data_dim): + begin.append(0) Review comment: apply similar append to size? `size.append(-1)` ---------------------------------------------------------------- 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: us...@infra.apache.org