I have converted my frozen graph pb to saved_model.pb
When I try to load that model using
# %%
import numpy as np
import cv2
from rknn.api import RKNN
# Create RKNN object
rknn = RKNN(verbose=True)
# %%
# Pre-process config
print("--> Config model")
rknn.config(mean_values=[0, 0, 0], std_values=[255, 255, 255], target_platform="rk3588")
print("done")
# %%
# Load model
print('--> Loading model')
ret = rknn.load_tensorflow(tf_pb='./saved/saved_model.pb',inputs=["input:0"],outputs=["d_predictions:0"],input_size_list = [[1, 3, 24, 94]])
if ret != 0:
print('Load model failed!')
exit(ret)
print('done')
i am getting following error
W __init__: rknn-toolkit2 version: 1.4.0-22dcfef4
--> Config model
done
--> Loading model
2023-03-19 15:50:35.550797: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/vscode/.local/lib/python3.8/site-packages/cv2/../../lib64:
2023-03-19 15:50:35.550820: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
W load_tensorflow: The inputs name should be a tensor name instead of node name
Traceback (most recent call last):
File "lprnet-notebook.py", line 20, in <module>
ret = rknn.load_tensorflow(tf_pb='./saved/saved_model.pb',inputs=["input:0"],outputs=["d_predictions:0"],input_size_list = [[1, 3, 24, 94]])
File "/home/vscode/.local/lib/python3.8/site-packages/rknn/api/rknn.py", line 120, in load_tensorflow
return self.rknn_base.load_tensorflow(tf_pb=tf_pb, inputs=inputs,
File "rknn/api/rknn_base.py", line 899, in rknn.api.rknn_base.RKNNBase.load_tensorflow
File "rknn/api/rknn_base.py", line 901, in rknn.api.rknn_base.RKNNBase.load_tensorflow
google.protobuf.message.DecodeError: Error parsing message
Could you please help?
Model was trained using tensorflow 1.15 --> is that an issue?