Trying to load this model into relay:
https://tfhub.dev/monatis/lite-model/german-mbmelgan/lite/1
tflite_model_buf = open(MODEL_PATH_TTS, "rb").read()
tflite_model = tflite.Model.GetRootAsModel(tflite_model_buf, 0)
model, params = relay.frontend.from_tflite(tflite_model)
Throws an exception while parsing the transpose conv layer:
File "/Users/escottal/Library/Application Support/JetBrains/CLion2021.3/scratches/scratch_tf_quant.py", line 28, in <module>
model, params = relay.frontend.from_tflite(tflite_model)
File "/code/tvm/python/tvm/relay/frontend/tflite.py", line 3758, in from_tflite
op_converter.convert_op_to_relay()
File "/code/tvm/python/tvm/relay/frontend/tflite.py", line 234, in convert_op_to_relay
ret = self.convert_map[op_code_str](op)
File "/code/tvm/python/tvm/relay/frontend/tflite.py", line 2917, in convert_transpose_conv
output_shape_value = self.get_tensor_value(output_shape_tensor)
File "/code/tvm/python/tvm/relay/frontend/tflite.py", line 421, in get_tensor_value
return np.frombuffer(data, dtype=dtype).reshape(shape)
TypeError: a bytes-like object is required, not 'int'
It should be an ndarray (as is with other layers), but the flatbuffer value that gets read is 0.
Any ideas?