|
尝试将shufflenet-V2 tf通过ckpt转pb转rknn的方式进行推理,通过Netron看到输入为IteratorGetNext,输出为Softmax。原始模型的链接为:
https://github.com/TropComplique/shufflenet-v2-tensorflow
在载入pb时报以下错误,怀疑是输入为迭代器出现的问题,请问该种情况如何解决?
--> Loading model
Catch exception when loading tensorflow model: ./shufflenet_v2_1.0x/shufflenet_v2_1.0x.pb!
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/importer.py", line 426, in import_graph_def
graph._c_graph, serialized, options) # pylint: disable=protected-access
tensorflow.python.framework.errors_impl.InvalidArgumentError: Input 0 of node IteratorGetNext was passed float from Iterator_out_0_placeholder:0 incompatible with expected resource.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/rknn/api/rknn.py", line 50, in load_tensorflow
std_values=std_values)
File "rknn/api/redirect_stdout.py", line 67, in rknn.api.redirect_stdout.redirect_stdout.func_wrapper
File "rknn/api/redirect_stdout.py", line 68, in rknn.api.redirect_stdout.redirect_stdout.func_wrapper
File "rknn/api/rknn_base.py", line 139, in rknn.api.rknn_base.RKNNBase.load_tensorflow
File "rknn/base/rknnlib/converter/convert_tf.py", line 432, in rknn.base.rknnlib.converter.convert_tf.convert_tf.pre_process
File "rknn/base/rknnlib/converter/tensorflowloader.py", line 102, in rknn.base.rknnlib.converter.tensorflowloader.TF_Graph_Preprocess.pre_proces
File "rknn/base/rknnlib/converter/tensorflowloader.py", line 621, in rknn.base.rknnlib.converter.tensorflowloader.TF_Graph_Preprocess.calc_2_const
File "rknn/base/rknnlib/converter/tf_util.py", line 375, in rknn.base.rknnlib.converter.tf_util.TFProto_Util.query_tensor
File "rknn/base/rknnlib/converter/tf_util.py", line 376, in rknn.base.rknnlib.converter.tf_util.TFProto_Util.query_tensor
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/framework/importer.py", line 430, in import_graph_def
raise ValueError(str(e))
ValueError: Input 0 of node IteratorGetNext was passed float from Iterator_out_0_placeholder:0 incompatible with expected resource.
Load shufflenet_v2_1.0x failed! Ret = -1
|
|