错误输出:
/usr/lib64/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
--> Loading model
E Catch exception when loading tensorflow model: frozen_inference_graph.pb!
T Traceback (most recent call last):
T File "/home/toybrick/.local/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 418, in import_graph_def
T graph._c_graph, serialized, options) # pylint: disable=protected-access
T tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef mentions attr 'Truncate' not in Op<name=Cast; signature=x:SrcT -> ystT; attr=SrcT:type; attr=DstT:type>; NodeDef: Cast = Cast[DstT=DT_FLOAT, SrcT=DT_UINT8, Truncate=false](image_tensor). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
T During handling of the above exception, another exception occurred:
T Traceback (most recent call last):
T File "rknn/api/rknn_base.py", line 137, in rknn.api.rknn_base.RKNNBase.load_tensorflow
T File "rknn/base/RKNNlib/converter/convert_tf.py", line 482, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.pre_process
T File "rknn/base/RKNNlib/converter/tensorflowloader.py", line 102, in rknn.base.RKNNlib.converter.tensorflowloader.TF_Graph_Preprocess.pre_proces
T File "rknn/base/RKNNlib/converter/tensorflowloader.py", line 627, in rknn.base.RKNNlib.converter.tensorflowloader.TF_Graph_Preprocess.calc_2_const
T File "rknn/base/RKNNlib/converter/tf_util.py", line 371, in rknn.base.RKNNlib.converter.tf_util.TFProto_Util.query_tensor
T File "rknn/base/RKNNlib/converter/tf_util.py", line 372, in rknn.base.RKNNlib.converter.tf_util.TFProto_Util.query_tensor
T File "/home/toybrick/.local/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 454, in new_func
T return func(*args, **kwargs)
T File "/home/toybrick/.local/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 422, in import_graph_def
T raise ValueError(str(e))
T ValueError: NodeDef mentions attr 'Truncate' not in Op<name=Cast; signature=x:SrcT -> ystT; attr=SrcT:type; attr=DstT:type>; NodeDef: Cast = Cast[DstT=DT_FLOAT, SrcT=DT_UINT8, Truncate=false](image_tensor). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
done
--> Building model
E Model or data is None, please load model first.
done
E RKNN model data is None, please load model first!
/usr/lib64/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
--> Loading model
E Catch exception when loading tensorflow model: frozen_inference_graph.pb!
T Traceback (most recent call last):
T File "/home/toybrick/.local/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 418, in import_graph_def
T graph._c_graph, serialized, options) # pylint: disable=protected-access
T tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef mentions attr 'Truncate' not in Op<name=Cast; signature=x:SrcT -> ystT; attr=SrcT:type; attr=DstT:type>; NodeDef: Cast = Cast[DstT=DT_FLOAT, SrcT=DT_UINT8, Truncate=false](image_tensor). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
T During handling of the above exception, another exception occurred:
T Traceback (most recent call last):
T File "rknn/api/rknn_base.py", line 137, in rknn.api.rknn_base.RKNNBase.load_tensorflow
T File "rknn/base/RKNNlib/converter/convert_tf.py", line 482, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.pre_process
T File "rknn/base/RKNNlib/converter/tensorflowloader.py", line 102, in rknn.base.RKNNlib.converter.tensorflowloader.TF_Graph_Preprocess.pre_proces
T File "rknn/base/RKNNlib/converter/tensorflowloader.py", line 627, in rknn.base.RKNNlib.converter.tensorflowloader.TF_Graph_Preprocess.calc_2_const
T File "rknn/base/RKNNlib/converter/tf_util.py", line 371, in rknn.base.RKNNlib.converter.tf_util.TFProto_Util.query_tensor
T File "rknn/base/RKNNlib/converter/tf_util.py", line 372, in rknn.base.RKNNlib.converter.tf_util.TFProto_Util.query_tensor
T File "/home/toybrick/.local/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 454, in new_func
T return func(*args, **kwargs)
T File "/home/toybrick/.local/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 422, in import_graph_def
T raise ValueError(str(e))
T ValueError: NodeDef mentions attr 'Truncate' not in Op<name=Cast; signature=x:SrcT -> ystT; attr=SrcT:type; attr=DstT:type>; NodeDef: Cast = Cast[DstT=DT_FLOAT, SrcT=DT_UINT8, Truncate=false](image_tensor). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).
done
--> Building model
E Model or data is None, please load model first.
done
E RKNN model data is None, please load model first!作者: Zen 时间: 2019-8-28 09:24
看起来像是未定义的节点操作。改model 或是等rk 支持自定义层吧
----------------------------
T tensorflow.python.framework.errors_impl.InvalidArgumentError: NodeDef mentions attr 'Truncate' not in Op<name=Cast; signature=x:SrcT -> ystT; attr=SrcT:type; attr=DstT:type>; NodeDef: Cast = Cast[DstT=DT_FLOAT, SrcT=DT_UINT8, Truncate=false](image_tensor). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).