Hi all~
I follow the tutorial of TVM Docs to get relay ir from Keras models. Then, I use mod.astext(show_meta_data=True)
to save the relay structure with metadata.
weights_path = download_testdata(weights_url, weights_file, module="keras")
keras_resnet50 = tf.keras.applications.resnet50.ResNet50(
include_top=True, weights=None, input_shape=(224, 224, 3), classes=1000
)
keras_resnet50.load_weights(weights_path)
shape_dict = {"input_1": data.shape}
mod, params = relay.frontend.from_keras(keras_resnet50, shape_dict)
text = mod.astext(show_meta_data=True)
However, it doesn’t work and I can only get the relay structure without metadata. I have ever saved relay with meta_data successfully on onnx model but this time I fail to do it on Keras models.
I give the reproduction script here.
Thanks in advance!