I am trying to use TVM to compile the previously trained H5 models stored 
locally. My code is as  follows:


import tvm
from tvm import te
import tvm.relay as relay
from tvm.contrib.download import download_testdata
import keras
import tensorflow as tf
import numpy as np
from keras.models import load_model

model_path=r'./model/lenet5-fashion-mnist_origin.h5'
my_model=load_model(model_path)
data_shape=(1,28,28,1)
shape_dict = {"conv2d_1": data_shape}
mod, params = relay.frontend.from_keras(my_model, shape_dict)
target = "llvm"
dev = tvm.cpu(0)

with tvm.transform.PassContext(opt_level=0):
    model = relay.build_module.create_executor("graph", mod, dev, target, 
params).evaluate()




but when I finish executing the above codes, TVM will return the following 
exception:

To enable them in other operations, rebuild TensorFlow with the appropriate 
compiler flags.
WARNING:tensorflow:No training configuration found in the save file, so the 
model was *not* compiled. Compile it manually.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
The type inference pass was unable to infer a type for this expression.
This usually occurs when an operator call is under constrained in some way, 
check other reported errors for hints of what may of happened.
note: run with `TVM_BACKTRACE=1` environment variable to display a backtrace.


May I ask you for an answer? Thank you very much. I am looking forward to your 
answers
.





---
[Visit 
Topic](https://discuss.tvm.apache.org/t/an-error-occurs-when-compiling-the-h5-model-using-tvm/12949/1)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.apache.org/email/unsubscribe/e89509a3a90a42d7116753bde52ac0d3b1809c2dce94ba5a1c5e98a7ac4e6ce3).

Reply via email to