I call relay.frontend.from_tensorflow to load the neural network graph which is a modified Transformer model:
from tvm import relay
import tensorflow as tf
import tvm.relay.testing.tf as tf_testing
try:
tf_compat_v1 = tf.compat.v1
except ImportError:
tf_compat_v1 = tf
model_path = "/mnt/data/Transformer_Model_tf2.3/model-predict.pb"
with tf_compat_v1.gfile.GFile(model_path, "rb") as f:
graph_def = tf_compat_v1.GraphDef()
graph_def.ParseFromString(f.read())
graph_def = tf_testing.ProcessGraphDefParam(graph_def)
mod, params = relay.frontend.from_tensorflow(graph_def)
When running this code, one error will be thrown out as below:
"The following operators are not implemented: {}".format(missing_operators) NotImplementedError: The following operators are not implemented: {āTensorListSetItemā, āTensorListStackā, āMatrixBandPartā, āTensorListFromTensorā, āTensorListGetItemā, āTensorListReserveā}
what should I do to fix it? thanks.