kevinthesun commented on a change in pull request #4510: Fix TF resize for 
dynamic size models
URL: https://github.com/apache/incubator-tvm/pull/4510#discussion_r357354620
 
 

 ##########
 File path: python/tvm/relay/frontend/tensorflow.py
 ##########
 @@ -416,9 +416,11 @@ def _impl(inputs, attr, params):
                        extras={'axis': int(axis), 'num_newaxis': 1})(inputs, 
attr)
     return _impl
 
-def _resize_bilinear(bilinear_op):
+def _resize(method):
     def _impl(inputs, attr, params):
-        size = attr['_output_shapes'][0][1:3]
+        output_shape0 = attr['_output_shapes'][0]
+        # Dynamic size models might have _output_shapes attr equal to [None] 
here
+        size = output_shape0[1:3] if output_shape0 is not None else [-1]
 
 Review comment:
   Add a test case to cover 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:
[email protected]


With regards,
Apache Git Services

Reply via email to