作者: wangshuyi 时间: 2019-7-13 18:22
T File "rknn/api/rknn_base.py", line 185, in rknn.api.rknn_base.RKNNBase.load_tensorflow
T File "rknn/base/RKNNlib/converter/convert_tf.py", line 589, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.match_paragraph_and_param
T File "rknn/base/RKNNlib/converter/convert_tf.py", line 488, in rknn.base.RKNNlib.converter.convert_tf.convert_tf._tf_push_ready_node
T TypeError: 'NoneType' object is not iterable
Build model failed!
不可迭代这个问题怎么解决作者: jefferyzhang 时间: 2019-7-13 19:47
input_size_list 就是你模型的输入尺寸,但是batchsize必须设成1。格式默认是NHWC作者: wangshuyi 时间: 2019-7-15 11:04
/home/shuyi/PycharmProjects/rknn_pro/venv/bin/python /home/shuyi/PycharmProjects/rknn_pro/convert_test.py
W verbose file path is invalid, debug info will not dump to file.
--->loding model
D import clients finished
WARNING: Logging before flag parsing goes to stderr.
W0715 10:55:14.304497 139777702983488 deprecation_wrapper.py:119] From /home/shuyi/PycharmProjects/rknn_pro/venv/lib/python3.6/site-packages/rknn/api/rknn.py:62: The name tf.GraphDef is deprecated. Please use tf.compat.v1.GraphDef instead.
W0715 10:55:14.342316 139777702983488 deprecation.py:323] From /home/shuyi/PycharmProjects/rknn_pro/venv/lib/python3.6/site-packages/rknn/api/rknn.py:62: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.graph_util.extract_sub_graph`
I Current TF Model producer version 0 min consumer version 0 bad consumer version []
I short-cut batch_normalization_5/gammaut0 - batch_normalization_5/FusedBatchNorm_1:in1 skip batch_normalization_5/gamma/read
I short-cut batch_normalization_9/gammaut0 - batch_normalization_9/FusedBatchNorm_1:in1 skip batch_normalization_9/gamma/read
I short-cut batch_normalization_5/moving_meanut0 - batch_normalization_5/FusedBatchNorm_1:in3 skip batch_normalization_5/moving_mean/read
I short-cut batch_normalization_11/betaut0 - batch_normalization_11/FusedBatchNorm_1:in2 skip batch_normalization_11/beta/read
I short-cut conv2d_9/kernelut0 - conv2d_9/convolution:in1 skip conv2d_9/kernel/read
I short-cut batch_normalization_9/betaut0 - batch_normalization_9/FusedBatchNorm_1:in2 skip batch_normalization_9/beta/read
I short-cut batch_normalization_10/moving_varianceut0 - batch_normalization_10/FusedBatchNorm_1:in4 skip batch_normalization_10/moving_variance/read
I short-cut batch_normalization_8/gammaut0 - batch_normalization_8/FusedBatchNorm_1:in1 skip batch_normalization_8/gamma/read
I short-cut batch_normalization_5/betaut0 - batch_normalization_5/FusedBatchNorm_1:in2 skip batch_normalization_5/beta/read
I short-cut batch_normalization_8/betaut0 - batch_normalization_8/FusedBatchNorm_1:in2 skip batch_normalization_8/beta/read
I short-cut batch_normalization_1/moving_variance:out0 - batch_normalization_1/FusedBatchNorm_1:in4 skip batch_normalization_1/moving_variance/read
I short-cut conv2d_6/kernel:out0 - conv2d_6/convolution:in1 skip conv2d_6/kernel/read
I short-cut batch_normalization_8/moving_variance:out0 - batch_normalization_8/FusedBatchNorm_1:in4 skip batch_normalization_8/moving_variance/read
I short-cut conv2d_2/kernel:out0 - conv2d_2/convolution:in1 skip conv2d_2/kernel/read
I short-cut conv2d_10/kernel:out0 - conv2d_10/convolution:in1 skip conv2d_10/kernel/read
I short-cut conv2d_3/kernel:out0 - conv2d_3/convolution:in1 skip conv2d_3/kernel/read
I short-cut batch_normalization_2/moving_variance:out0 - batch_normalization_2/FusedBatchNorm_1:in4 skip batch_normalization_2/moving_variance/read
I short-cut batch_normalization_7/moving_variance:out0 - batch_normalization_7/FusedBatchNorm_1:in4 skip batch_normalization_7/moving_variance/read
I short-cut batch_normalization_6/gamma:out0 - batch_normalization_6/FusedBatchNorm_1:in1 skip batch_normalization_6/gamma/read
I short-cut y2/bias:out0 - y2/BiasAdd:in1 skip y2/bias/read
I short-cut batch_normalization_6/moving_variance:out0 - batch_normalization_6/FusedBatchNorm_1:in4 skip batch_normalization_6/moving_variance/read
I short-cut batch_normalization_3/beta:out0 - batch_normalization_3/FusedBatchNorm_1:in2 skip batch_normalization_3/beta/read
I short-cut batch_normalization_1/moving_mean:out0 - batch_normalization_1/FusedBatchNorm_1:in3 skip batch_normalization_1/moving_mean/read
I short-cut batch_normalization_6/beta:out0 - batch_normalization_6/FusedBatchNorm_1:in2 skip batch_normalization_6/beta/read
I short-cut y1/bias:out0 - y1/BiasAdd:in1 skip y1/bias/read
I short-cut batch_normalization_3/moving_variance:out0 - batch_normalization_3/FusedBatchNorm_1:in4 skip batch_normalization_3/moving_variance/read
I short-cut batch_normalization_4/moving_mean:out0 - batch_normalization_4/FusedBatchNorm_1:in3 skip batch_normalization_4/moving_mean/read
I short-cut batch_normalization_11/moving_variance:out0 - batch_normalization_11/FusedBatchNorm_1:in4 skip batch_normalization_11/moving_variance/read
I short-cut conv2d_4/kernel:out0 - conv2d_4/convolution:in1 skip conv2d_4/kernel/read
I short-cut batch_normalization_10/moving_mean:out0 - batch_normalization_10/FusedBatchNorm_1:in3 skip batch_normalization_10/moving_mean/read
I short-cut conv2d_7/kernel:out0 - conv2d_7/convolution:in1 skip conv2d_7/kernel/read
I short-cut batch_normalization_11/gamma:out0 - batch_normalization_11/FusedBatchNorm_1:in1 skip batch_normalization_11/gamma/read
I short-cut conv2d_1/kernel:out0 - conv2d_1/convolution:in1 skip conv2d_1/kernel/read
I short-cut batch_normalization_7/moving_mean:out0 - batch_normalization_7/FusedBatchNorm_1:in3 skip batch_normalization_7/moving_mean/read
I short-cut batch_normalization_8/moving_mean:out0 - batch_normalization_8/FusedBatchNorm_1:in3 skip batch_normalization_8/moving_mean/read
I short-cut batch_normalization_4/moving_variance:out0 - batch_normalization_4/FusedBatchNorm_1:in4 skip batch_normalization_4/moving_variance/read
I short-cut batch_normalization_10/gamma:out0 - batch_normalization_10/FusedBatchNorm_1:in1 skip batch_normalization_10/gamma/read
I short-cut batch_normalization_5/moving_variance:out0 - batch_normalization_5/FusedBatchNorm_1:in4 skip batch_normalization_5/moving_variance/read
I short-cut batch_normalization_3/moving_mean:out0 - batch_normalization_3/FusedBatchNorm_1:in3 skip batch_normalization_3/moving_mean/read
I short-cut batch_normalization_9/moving_variance:out0 - batch_normalization_9/FusedBatchNorm_1:in4 skip batch_normalization_9/moving_variance/read
I short-cut batch_normalization_4/beta:out0 - batch_normalization_4/FusedBatchNorm_1:in2 skip batch_normalization_4/beta/read
I short-cut conv2d_5/kernel:out0 - conv2d_5/convolution:in1 skip conv2d_5/kernel/read
I short-cut conv2d_8/kernel:out0 - conv2d_8/convolution:in1 skip conv2d_8/kernel/read
I short-cut conv2d_11/kernel:out0 - conv2d_11/convolution:in1 skip conv2d_11/kernel/read
I short-cut batch_normalization_2/beta:out0 - batch_normalization_2/FusedBatchNorm_1:in2 skip batch_normalization_2/beta/read
I short-cut y2/kernel:out0 - y2/convolution:in1 skip y2/kernel/read
I short-cut batch_normalization_10/beta:out0 - batch_normalization_10/FusedBatchNorm_1:in2 skip batch_normalization_10/beta/read
I short-cut batch_normalization_3/gamma:out0 - batch_normalization_3/FusedBatchNorm_1:in1 skip batch_normalization_3/gamma/read
I short-cut batch_normalization_1/gamma:out0 - batch_normalization_1/FusedBatchNorm_1:in1 skip batch_normalization_1/gamma/read
I short-cut batch_normalization_7/gamma:out0 - batch_normalization_7/FusedBatchNorm_1:in1 skip batch_normalization_7/gamma/read
I short-cut batch_normalization_6/moving_mean:out0 - batch_normalization_6/FusedBatchNorm_1:in3 skip batch_normalization_6/moving_mean/read
I short-cut batch_normalization_9/moving_mean:out0 - batch_normalization_9/FusedBatchNorm_1:in3 skip batch_normalization_9/moving_mean/read
I short-cut batch_normalization_7/beta:out0 - batch_normalization_7/FusedBatchNorm_1:in2 skip batch_normalization_7/beta/read
I short-cut batch_normalization_2/moving_mean:out0 - batch_normalization_2/FusedBatchNorm_1:in3 skip batch_normalization_2/moving_mean/read
I short-cut batch_normalization_2/gamma:out0 - batch_normalization_2/FusedBatchNorm_1:in1 skip batch_normalization_2/gamma/read
I short-cut batch_normalization_1/beta:out0 - batch_normalization_1/FusedBatchNorm_1:in2 skip batch_normalization_1/beta/read
I short-cut batch_normalization_4/gamma:out0 - batch_normalization_4/FusedBatchNorm_1:in1 skip batch_normalization_4/gamma/read
I short-cut batch_normalization_11/moving_mean:out0 - batch_normalization_11/FusedBatchNorm_1:in3 skip batch_normalization_11/moving_mean/read
I short-cut y1/kernel:out0 - y1/convolution:in1 skip y1/kernel/read
I Have 1 tensors convert to const tensor
W0715 10:55:14.471899 139777702983488 deprecation_wrapper.py:119] From /home/shuyi/PycharmProjects/rknn_pro/venv/lib/python3.6/site-packages/rknn/api/rknn.py:62: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.
2019-07-15 10:55:14.472745: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcuda.so.1
2019-07-15 10:55:14.486798: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-07-15 10:55:14.487460: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties:
name: GeForce GTX 1050 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.62
pciBusID: 0000:01:00.0
2019-07-15 10:55:14.487611: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2019-07-15 10:55:14.488426: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcublas.so.10.0
2019-07-15 10:55:14.489086: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcufft.so.10.0
2019-07-15 10:55:14.489264: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcurand.so.10.0
2019-07-15 10:55:14.490082: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusolver.so.10.0
2019-07-15 10:55:14.490700: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusparse.so.10.0
2019-07-15 10:55:14.492606: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
2019-07-15 10:55:14.492727: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-07-15 10:55:14.493447: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-07-15 10:55:14.494087: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0
2019-07-15 10:55:14.494316: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-07-15 10:55:14.583285: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-07-15 10:55:14.583701: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5061960 executing computations on platform CUDA. Devices:
2019-07-15 10:55:14.583719: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): GeForce GTX 1050 Ti, Compute Capability 6.1
2019-07-15 10:55:14.608436: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2208000000 Hz
2019-07-15 10:55:14.609279: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x512dd40 executing computations on platform Host. Devices:
2019-07-15 10:55:14.609303: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor device (0): <undefined>, <undefined>
2019-07-15 10:55:14.609506: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-07-15 10:55:14.609845: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1640] Found device 0 with properties:
name: GeForce GTX 1050 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.62
pciBusID: 0000:01:00.0
2019-07-15 10:55:14.609879: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2019-07-15 10:55:14.609896: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcublas.so.10.0
2019-07-15 10:55:14.609912: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcufft.so.10.0
2019-07-15 10:55:14.609934: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcurand.so.10.0
2019-07-15 10:55:14.609951: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusolver.so.10.0
2019-07-15 10:55:14.609967: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcusparse.so.10.0
2019-07-15 10:55:14.609983: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
2019-07-15 10:55:14.610039: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-07-15 10:55:14.610380: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-07-15 10:55:14.610674: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0
2019-07-15 10:55:14.610701: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.10.0
2019-07-15 10:55:14.612031: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-07-15 10:55:14.612042: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187] 0
2019-07-15 10:55:14.612048: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 0: N
2019-07-15 10:55:14.612167: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-07-15 10:55:14.612515: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1005] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2019-07-15 10:55:14.612828: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1326] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3451 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1050 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1)
W0715 10:55:14.613806 139777702983488 deprecation_wrapper.py:119] From /home/shuyi/PycharmProjects/rknn_pro/venv/lib/python3.6/site-packages/rknn/api/rknn.py:62: The name tf.global_variables_initializer is deprecated. Please use tf.compat.v1.global_variables_initializer instead.
2019-07-15 10:55:15.023960: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
['up_sampling2d_1/mul:out0']
I build output layer attach_y1/BiasAdd:out0
I build output layer attach_y2/BiasAdd:out0
I build input layer x_input:out0
D Try match BiasAdd y1/BiasAdd
I Match convolution_biasadd [['y1/BiasAdd', 'y1/convolution', 'y1/bias', 'y1/kernel']] [['BiasAdd', 'Conv', 'C', 'C_1']] to [['convolution']]
D Try match BiasAdd y2/BiasAdd
I Match convolution_biasadd [['y2/BiasAdd', 'y2/convolution', 'y2/bias', 'y2/kernel']] [['BiasAdd', 'Conv', 'C', 'C_1']] to [['convolution']]
D Try match LeakyRelu leaky_re_lu_9/LeakyRelu
W Not match node leaky_re_lu_9/LeakyRelu LeakyRelu
E Catch exception when loading tensorflow model: /home/shuyi/PycharmProjects/rknn_pro/model/tf_model.pb!
T Traceback (most recent call last):
T File "rknn/api/rknn_base.py", line 185, in rknn.api.rknn_base.RKNNBase.load_tensorflow
T File "rknn/base/RKNNlib/converter/convert_tf.py", line 589, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.match_paragraph_and_param
T File "rknn/base/RKNNlib/converter/convert_tf.py", line 488, in rknn.base.RKNNlib.converter.convert_tf.convert_tf._tf_push_ready_node
T TypeError: 'NoneType' object is not iterable
Build model failed!
Process finished with exit code 255
这种情况是这个层不支持吗 作者: jefferyzhang 时间: 2019-7-16 08:39
W Not match node leaky_re_lu_9/LeakyRelu LeakyRelu
是的,op不支持作者: sunxing 时间: 2019-10-14 15:15
请教这个是怎么回事?是 rnn/transpose_1这个op不支持吗?
D import clients finished
I Current TF Model producer version 0 min consumer version 0 bad consumer version []
I short-cut Variable_1ut0 - add:in1 skip Variable_1/read
I short-cut deptwise_filterut0 - separable_conv2d/depthwise:in1 skip deptwise_filter/read
I short-cut Variableut0 - MatMul:in1 skip Variable/read
I short-cut pointwise_filterut0 - separable_conv2d:in1 skip pointwise_filter/read
I short-cut rnn/lstm_cell/biasut0 - rnn/while/lstm_cell/BiasAdd/Enter:in0 skip rnn/lstm_cell/bias/read
I short-cut rnn/lstm_cell/kernelut0 - rnn/while/lstm_cell/MatMul/Enter:in0 skip rnn/lstm_cell/kernel/read
I Have 7 tensors convert to const tensor
2019-10-14 07:07:35.033348: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
['rnn/strided_sliceut0', 'rnn/concatut0', 'rnn/TensorArrayUnstack/rangeut0', 'rnn/LSTMCellZeroState/zeros_1ut0', 'rnn/LSTMCellZeroState/zeros:out0', 'rnn/Minimum:out0', 'rnn/concat_2:out0']
I build output layer attach_op_output:out0
I build input layer op_input:out0
D Try match Reshape op_output
I Match reshape [['op_output/shape', 'op_output']] [['Reshape', 'C']] to [['reshape']]
D Try match Add add
I Match rsp_fc_add [['add', 'Reshape/shape', 'Variable_1', 'Reshape', 'Variable', 'MatMul']] [['Add', 'MatMul', 'C', 'Reshape', 'C_1', 'C_2']] to [['fullconnect']]
D Try match Transpose rnn/transpose_1
E Catch exception when loading tensorflow model: ./model.pb!
T Traceback (most recent call last):
T File "rknn/api/rknn_base.py", line 185, in rknn.api.rknn_base.RKNNBase.load_tensorflow
T File "rknn/base/RKNNlib/converter/convert_tf.py", line 561, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.match_paragraph_and_param
T File "rknn/base/RKNNlib/converter/convert_tf.py", line 364, in rknn.base.RKNNlib.converter.convert_tf.convert_tf._tf_try_match_ruler
T File "rknn/base/RKNNlib/converter/convert_tf.py", line 294, in rknn.base.RKNNlib.converter.convert_tf.convert_tf._tf_match_flow_process
T TypeError: 'NoneType' object is not iterable
Load fast_scnn failed! Ret = -1 作者: jefferyzhang 时间: 2019-10-15 08:18
sunxing 发表于 2019-10-14 15:15
请教这个是怎么回事?是 rnn/transpose_1这个op不支持吗?
D import clients finished
I Current TF Model ...