tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] masahi edited a comment on issue #5243: [Frontend][TensorFlow]Improve TensorFlow Static Shape Tensor Array
Date Sat, 11 Apr 2020 00:12:05 GMT
masahi edited a comment on issue #5243: [Frontend][TensorFlow]Improve TensorFlow Static Shape
Tensor Array
URL: https://github.com/apache/incubator-tvm/pull/5243#issuecomment-612270589
 
 
   > @masahi To support different axis we need to change both `define_tensor_concatenate`
and `define_tensor_array_concat` to support axis arguments. The main thing we need to take
care is the output shape.
   
   Ok for now I went an easy route of just defining concat_last op. It seems to work, but
I'm getting the following typing error:
   
   ```
   ...
     %101 = @map(tensor_constructor_float32_?_2_4(Tensor[(?, 2, 4), float32]), %100);
     %102 = @tensor_array_concat_last_float32_?_2_?(%101) unable to unify: `static_tensor_float32_?_2_4_t`
and `static_tensor_float32_?_2_?_t`; ;
     %103 = @tensor_get_data_float32_?_2_?(%102);
   ...
   ```
   
   The first axis is already Any by tensor array stack. Now I'm trying to concat (?, 2, 4)
tensors along -1 axis to get (?, 2, ?) tensor. Is this possible? They typing error suggests
no.
   
   UPDATE: Solved by mapping tensor_constructor with concat-ed shape (?, 2, ?):
   ```
     %101 = @map(tensor_constructor_float32_?_2_?(Tensor[(?, 2, ?), float32]), %100) /* ty=List[static_tensor_float32_?_2_?_t[]]
*/;
     %102 = @tensor_array_concat_last_float32_?_2_?(%101) /* ty=static_tensor_float32_?_2_?_t[]
*/;
     %103 = @tensor_get_data_float32_?_2_?(%102) /* ty=Tensor[(?, 2, ?), float32] */;
   ```

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