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/09/29 10:31:17 UTC

[GitHub] [incubator-tvm] jtuyls opened a new pull request #6589: [Frontend][Tensorflow] Fix TF 1.15 conv2d_transpose parsing

jtuyls opened a new pull request #6589:
URL: https://github.com/apache/incubator-tvm/pull/6589


   Fix for Tensorflow 1.15.0 conv2d_transpose parsing. Specifically, attr["_output_shapes"][0] can be None.
   
   Following snippet can be used to create a model for reproducing the bug (run with TF 1.15.0):
   ```
   import tensorflow as tf
   
   output_shape = [1, 8, 8, 128]
   strides = [1, 2, 2, 1]
   
   x = tf.compat.v1.placeholder(tf.float32, shape=[1, 32, 32, 4])
   w = tf.constant(0.1, shape=[7, 7, 128, 4])
   ct = tf.nn.conv2d_transpose(x, w, output_shape=output_shape, strides=strides, padding='SAME')
   
   graph_def = tf.compat.v1.get_default_graph().as_graph_def()
   with tf.io.gfile.GFile('conv2d_transpose_tf1_15.pb', "wb") as f:
       f.write(graph_def.SerializeToString())
   ```
   
   In general, I think it might be useful to adjust the CI to run the frontend tests with multiple versions of the the external frameworks to verify compatibility with the versions we want to support?
   
   @siju-samuel @masahi, could you have a look?


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



[GitHub] [incubator-tvm] siju-samuel commented on a change in pull request #6589: [Frontend][Tensorflow] Fix TF 1.15 conv2d_transpose parsing

Posted by GitBox <gi...@apache.org>.
siju-samuel commented on a change in pull request #6589:
URL: https://github.com/apache/incubator-tvm/pull/6589#discussion_r496856859



##########
File path: python/tvm/relay/frontend/tensorflow.py
##########
@@ -302,7 +302,11 @@ def _impl(inputs, attr, params, mod):
             )
             attr["data_format"] = "NCHW"
 
-            if opname == "conv_transpose" and len(attr["_output_shapes"]) > 0:
+            if (

Review comment:
       Could you please add a comment about this?




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



[GitHub] [incubator-tvm] jtuyls commented on pull request #6589: [Frontend][Tensorflow] Fix TF 1.15 conv2d_transpose parsing

Posted by GitBox <gi...@apache.org>.
jtuyls commented on pull request #6589:
URL: https://github.com/apache/incubator-tvm/pull/6589#issuecomment-701525613


   @siju-samuel I guess this issue is really caused by not using AddShapesToGraphDef but I think it's still useful to include the small changes to cover this case. So I added checks for that to the Tensorflow convolution tests. Could you have a look?
   
   Additionally, we could maybe add tests for this case to the other operations?


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



[GitHub] [incubator-tvm] tqchen merged pull request #6589: [Frontend][Tensorflow] Fix TF 1.15 conv2d_transpose parsing

Posted by GitBox <gi...@apache.org>.
tqchen merged pull request #6589:
URL: https://github.com/apache/incubator-tvm/pull/6589


   


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



[GitHub] [incubator-tvm] tqchen commented on pull request #6589: [Frontend][Tensorflow] Fix TF 1.15 conv2d_transpose parsing

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #6589:
URL: https://github.com/apache/incubator-tvm/pull/6589#issuecomment-706710804


   Thanks @jtuyls @siju-samuel 


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