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/06/10 05:21:51 UTC

[GitHub] [incubator-tvm] lixiaoquan opened a new pull request #5762: [TF] Support symbolic inputs of Fill

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


   
   


----------------------------------------------------------------
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] kevinthesun commented on pull request #5762: [TF] Support symbolic inputs of Fill

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


   Thanks @lixiaoquan 


----------------------------------------------------------------
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] kevinthesun commented on a change in pull request #5762: [TF] Support symbolic inputs of Fill

Posted by GitBox <gi...@apache.org>.
kevinthesun commented on a change in pull request #5762:
URL: https://github.com/apache/incubator-tvm/pull/5762#discussion_r438948105



##########
File path: python/tvm/relay/frontend/tensorflow.py
##########
@@ -1352,12 +1352,17 @@ def _impl(inputs, attr, params, mod):
         # Output shape must be defined to avoid errors. If any axis is not, we must
         # try to compute its shape.
         if output_shape is None or -1 in output_shape:
-            output_shape = _infer_value(inputs[0], params).asnumpy().reshape([-1]).tolist()
+            try:
+                output_shape = _infer_value(inputs[0], params, mod).asnumpy().reshape([-1]).tolist()
+            except (IndexError, KeyError, AttributeError):

Review comment:
       Need a general exception for _infer_value




----------------------------------------------------------------
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] kevinthesun commented on a change in pull request #5762: [TF] Support symbolic inputs of Fill

Posted by GitBox <gi...@apache.org>.
kevinthesun commented on a change in pull request #5762:
URL: https://github.com/apache/incubator-tvm/pull/5762#discussion_r438299882



##########
File path: python/tvm/relay/frontend/tensorflow.py
##########
@@ -1352,12 +1352,17 @@ def _impl(inputs, attr, params, mod):
         # Output shape must be defined to avoid errors. If any axis is not, we must
         # try to compute its shape.
         if output_shape is None or -1 in output_shape:
-            output_shape = _infer_value(inputs[0], params).asnumpy().reshape([-1]).tolist()
+            try:
+                output_shape = _infer_value(inputs[0], params).asnumpy().reshape([-1]).tolist()

Review comment:
       ```suggestion
                   output_shape = _infer_value(inputs[0], params, mod).asnumpy().reshape([-1]).tolist()
   ```




----------------------------------------------------------------
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] kevinthesun merged pull request #5762: [TF] Support symbolic inputs of Fill

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


   


----------------------------------------------------------------
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] lixiaoquan commented on a change in pull request #5762: [TF] Support symbolic inputs of Fill

Posted by GitBox <gi...@apache.org>.
lixiaoquan commented on a change in pull request #5762:
URL: https://github.com/apache/incubator-tvm/pull/5762#discussion_r438723482



##########
File path: python/tvm/relay/frontend/tensorflow.py
##########
@@ -1352,12 +1352,17 @@ def _impl(inputs, attr, params, mod):
         # Output shape must be defined to avoid errors. If any axis is not, we must
         # try to compute its shape.
         if output_shape is None or -1 in output_shape:
-            output_shape = _infer_value(inputs[0], params).asnumpy().reshape([-1]).tolist()
+            try:
+                output_shape = _infer_value(inputs[0], params).asnumpy().reshape([-1]).tolist()

Review comment:
       It's fixed.




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