trevor-m commented on a change in pull request #8454:
URL: https://github.com/apache/tvm/pull/8454#discussion_r672690567
##########
File path: python/tvm/relay/frontend/tensorflow_ops.py
##########
@@ -138,6 +138,25 @@ def _get_more_static_shape(shape0, shape1):
return shape1
+def _get_more_static_shape_rank(shape0, shape1):
+ """Compare two shapes with different rank,
+ and return the one with fewer symbolic dimension.
+ """
+ num_sym_dim0 = 0
Review comment:
Could be simplified to
```
num_sym_dim0 = sum([not isinstance(dim, (int, tvm.tir.expr.IntImm)) for dim
in list(shape0)])
num_sym_dim1 = sum([not isinstance(dim, (int, tvm.tir.expr.IntImm)) for dim
in list(shape1)])
```
##########
File path: python/tvm/relay/frontend/tensorflow2.py
##########
@@ -325,12 +475,30 @@ def _convert_operator(self, graph, op_name, node_name,
inputs, attrs):
sym = _convert_map_common[op_name](inputs, attrs,
self._params, self._prelude)
else:
sym = _convert_map_common[op_name](inputs, attrs,
self._params, self._module.mod)
+ elif op_name in _convert_map_tf2:
Review comment:
Should the priority go to using the TF2 converter if an op converter
happens to be registered in both TF1 and TF2 convert_map?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]