tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] kevinthesun commented on a change in pull request #5306: [Torch] Support Python list, more realistic recurrent networks
Date Mon, 13 Apr 2020 02:17:13 GMT
kevinthesun commented on a change in pull request #5306: [Torch] Support Python list, more
realistic recurrent networks
URL: https://github.com/apache/incubator-tvm/pull/5306#discussion_r407287295
 
 

 ##########
 File path: python/tvm/relay/frontend/pytorch.py
 ##########
 @@ -184,11 +182,9 @@ def _impl(inputs, input_types):
 def _concatenate(prelude):
     def tensor_array_concat(lst, axis):
         assert axis == 0, "Tensor array concat supported only for axis 0"
-        shape = _infer_type_with_prelude(prelude.hd(lst), prelude).shape
-        concat_shape = (Any(),) + tuple(shape[1:])
-
-        tensor_array = _map_tensor_array_constructor(lst, prelude, shape)
-        static_tensor_array_ops = StaticTensorArrayOps(prelude, "float32", concat_shape)
+        tensor_array, shape = _convert_to_tensor_array(lst, prelude)
+        concat_shape = (Any(),) + shape[1:]
+        static_tensor_array_ops = StaticTensorArrayOps(prelude, "float32", shape)
         static_tensor_array_ops.define_tensor_get_data(concat_shape)
 
         concat = prelude.get_var_static('tensor_array_concat', "float32", concat_shape)
 
 Review comment:
   Also need to use shape here?

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

Mime
View raw message