Toybrick

TF输入为迭代器时出现问题

Eason93

新手上路

积分
7
楼主
发表于 2019-5-29 15:15:59    查看: 8363|回复: 0 | [复制链接]    打印 | 只看该作者
尝试将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


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表