sayakpaul opened a new issue #9819:
URL: https://github.com/apache/tvm/issues/9819


   I am trying to compile the following model using [this 
guide](https://tvm.apache.org/docs/how_to/compile_models/from_keras.html):
   
   ```py
   import tensorflow as tf 
   import tensorflow_hub as hub
   
   
   hub_url = 
"gs://cloud-tpu-checkpoints/efficientnet/v2/hub/efficientnetv2-b2/feature-vector"
   efficientv2_b2 = tf.keras.Sequential(
       [
           tf.keras.layers.InputLayer(input_shape=(260, 260, 3)),
           hub.KerasLayer(hub_url, trainable=False),
           tf.keras.layers.Dense(5, activation="softmax"),
       ]
   )
   ```
   
   Compilation code:
   
   ```py
   from tvm import te
   import tvm
   import tvm.relay as relay
   
   shape_dict = {"input_1": (1, 3, 260, 260)}
   mod, params = relay.frontend.from_keras(efficientv2_b2, shape_dict)
               
   target = "cpu"
   dev = tvm.cpu(0)
   
   with tvm.transform.PassContext(opt_level=0):
       model = relay.build_module.create_executor("graph", mod, dev, target, 
params).evaluate()
   ```
   
   It leads to complaining Hub layers are not being supported by TVM. Is there 
a workaround? 
   
   ### Expected behavior
   
   The compilation would be complete without fail.
   
   ### Actual behavior
   
   It leads to complaining Hub layers are not being supported by TVM.
   
   ### Environment
   
   I built TVM with NNPack following the guide: 
https://tvm.apache.org/docs/install/from_source.html. I am using Debian 10 on a 
GCP machine (`n1-standard-8`). TensorFlow version is 2.7.0. 
   
   ### Steps to reproduce
   
   Have already provided it. 
   


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


Reply via email to