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/03/17 19:24:38 UTC

[GitHub] [tvm] CircleSpin commented on a change in pull request #7674: [TVMC] Allow optional arguments to be passed to importers

CircleSpin commented on a change in pull request #7674:
URL: https://github.com/apache/tvm/pull/7674#discussion_r596318497



##########
File path: tests/python/driver/tvmc/test_frontends.py
##########
@@ -115,26 +115,38 @@ def test_load_model__tflite(tflite_mobilenet_v1_1_quant):
     assert "_param_1" in params.keys()
 
 
-def test_load_model__keras(keras_resnet50):
+def verify_load_model__keras(model, **kwargs):
     # some CI environments wont offer TensorFlow/Keras, so skip in case it is not present
     pytest.importorskip("tensorflow")
 
-    mod, params = tvmc.frontends.load_model(keras_resnet50)
+    mod, params = tvmc.frontends.load_model(model)
     assert type(mod) is IRModule
     assert type(params) is dict
     ## check whether one known value is part of the params dict
     assert "_param_1" in params.keys()
 
 
-def test_load_model__onnx(onnx_resnet50):
-    # some CI environments wont offer onnx, so skip in case it is not present
-    pytest.importorskip("onnx")
+def test_load_model__keras(keras_resnet50):
+    verify_load_model__keras(keras_resnet50)
+    verify_load_model__keras(keras_resnet50, layout="NCHW")
+
 
-    mod, params = tvmc.frontends.load_model(onnx_resnet50)
+def verify_load_model__onnx(model, **kwargs):

Review comment:
       The onnx test is a little bit more complex because of the things being tested, so I think I'm going to leave it as is and try to not break things. 




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