srkreddy1238 commented on a change in pull request #7498:
URL: https://github.com/apache/tvm/pull/7498#discussion_r584028985
##########
File path: python/tvm/relay/frontend/tensorflow.py
##########
@@ -3682,6 +3729,30 @@ def from_tensorflow(graph, layout="NHWC", shape=None,
outputs=None):
params : dict of str to tvm.nd.NDArray
Dict of converted parameters stored in tvm.nd.NDArray format
"""
+ from tensorflow.python.eager.function import ConcreteFunction
+
+ if isinstance(graph, ConcreteFunction):
Review comment:
Wrapper will change frontend API. We could seek community opinion on
this.
I thought of saved_model, but we already have TFParser
(python/tvm/relay/frontend/tensorflow_parser.py) helper that handles
saved_model formats. I think we could make ```from_tensorflow``` being single
entry for GraphDef / ConcreteFunction / Saved Model Dir. TFParser can handle
all transforms until it results GraphDef.
TFHub URL to GraphDef can also be added to TFParser, but hub.KerasLayer has
bunch or args to handle some times. We could hold it for now.
I will amend this PR with these changes and also TF1.x / TF2.x compatibility
we discussed.
----------------------------------------------------------------
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]