in src/neo_loader/helpers/tf_model_helper.py [0:0]
def get_metadata(self) -> {str: List}:
# We need to strip the trailing ":0" from the input names since DLR cannot handle it.
# RelayTVM handles it gracefully and we can pass the names as is to relay.
# https://github.com/apache/incubator-tvm/blob/master/python/tvm/relay/frontend/tensorflow.py#L2860
return {
"Inputs": [
{'name': tensor.name.replace(":0", ""), 'dtype': tensor.dtype.name, 'shape': tensor.shape.as_list()}
for tensor in self.input_tensors
],
"Outputs": [
{'name': tensor.name, 'dtype': tensor.dtype.name, 'shape': tensor.shape.as_list() if tensor.shape else None}
for tensor in self.output_tensors
]
}