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 2021/05/24 23:15:38 UTC

[GitHub] [tvm] zhiics commented on a change in pull request #8074: [Frontend] [Tensorflow2] Added test infrastructure for TF2 frozen models

zhiics commented on a change in pull request #8074:
URL: https://github.com/apache/tvm/pull/8074#discussion_r638342154



##########
File path: tests/python/frontend/tensorflow2/common.py
##########
@@ -0,0 +1,106 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# pylint: disable=import-self, invalid-name, unused-argument, too-many-lines, len-as-condition, broad-except
+# pylint: disable=import-outside-toplevel, redefined-builtin
+"""TF2 to relay converter test utilities"""
+
+import tvm
+from tvm import relay
+
+from tvm.runtime.vm import VirtualMachine
+import tvm.contrib.graph_executor as runtime
+from tvm.relay.frontend.tensorflow import from_tensorflow
+
+import tvm.testing
+from tvm.relay.testing.tf import vmobj_to_list as vmobj_to_list
+
+import tensorflow as tf
+from tensorflow.python.eager.def_function import Function
+
+
+def run_tf_code(func, input_):
+    print(type(func))

Review comment:
       remove or change to log

##########
File path: python/tvm/relay/testing/tf.py
##########
@@ -73,6 +75,46 @@ def convert_to_list(x):
     return x
 
 
+def vmobj_to_list(o):

Review comment:
       is this copied from somewhere? We can add this to testing to remove the other places




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