标题: Darknet-yolov4模型转换为rknn时出错 [打印本页] 作者: ynzhang 时间: 2020-10-20 15:10 标题: Darknet-yolov4模型转换为rknn时出错 1. ubuntu16.04物理PC中安装rknn-toolkit-v1.4.0,进行Darknet-yolov4模型转换到rknn出现如下错误:
--> Loading model
done
--> config model
done
--> Building model
W The RKNN Model generated can not run on simulator when pre_compile is True.
W The target_platform is not set in config, using default target platform rk1808.
W The channel_mean_value filed will not be used in the future!
W:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/control_flow_ops.py:3632: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
W:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/control_flow_ops.py:1941: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version.
Instructions for updating:
tf.py_func is deprecated in TF V2. Instead, use
tf.py_function, which takes a python function which manipulates tf eager
tensors instead of numpy arrays. It's easy to convert a tf eager tensor to
an ndarray (just call tensor.numpy()) but having access to eager tensors
means `tf.py_function`s can use accelerators such as GPUs as well as
being differentiable using a gradient tape.
cc1: warning: command line option '-std=c++11' is valid for C++/ObjC++ but not for C
vnn_yolov4.c: In function 'vnn_CreateYolov4':
vnn_yolov4.c:209:25: error: 'VSI_NN_OP_MISH' undeclared (first use in this function)
NEW_VXNODE(node[1], VSI_NN_OP_MISH, 1, 1, 3);
^
vnn_yolov4.c:23:40: note: in definition of macro 'NEW_VXNODE'
_node = vsi_nn_AddNode( graph, _type, _in, _out, NULL );\
^
vnn_yolov4.c:209:25: note: each undeclared identifier is reported only once for each function it appears in
NEW_VXNODE(node[1], VSI_NN_OP_MISH, 1, 1, 3);
^
vnn_yolov4.c:23:40: note: in definition of macro 'NEW_VXNODE'
_node = vsi_nn_AddNode( graph, _type, _in, _out, NULL );\
^
make: *** [vnn_yolov4.o] Error 1
/bin/sh: 1: /tmp/tmpuf10lt3v/gen_nbg: not found
mv: cannot stat '/test/yolov4/*.nb': No such file or directory
mv: cannot stat '/test/yolov4/*.dat': No such file or directory
E Generate nbg failed.
W ----------------Warning(3)----------------
E Catch exception when building RKNN model!
E Traceback (most recent call last):
E File "rknn/base/ovxconfiggenerator.py", line 205, in rknn.base.ovxconfiggenerator.generate_vx_config_from_files
E File "rknn/base/RKNNlib/app/exporter/ovxlib_case/casegenerator.py", line 543, in rknn.base.RKNNlib.app.exporter.ovxlib_case.casegenerator.CaseGenerator.generate
E File "rknn/base/RKNNlib/app/exporter/ovxlib_case/casegenerator.py", line 507, in rknn.base.RKNNlib.app.exporter.ovxlib_case.casegenerator.CaseGenerator._gen_special_case
E File "rknn/base/RKNNlib/app/exporter/ovxlib_case/casegenerator.py", line 474, in rknn.base.RKNNlib.app.exporter.ovxlib_case.casegenerator.CaseGenerator._gen_nb_file
E AttributeError: 'CaseGenerator' object has no attribute 'nbg_graph_file_path'
E During handling of the above exception, another exception occurred:
E Traceback (most recent call last):
E File "rknn/api/rknn_base.py", line 918, in rknn.api.rknn_base.RKNNBase.build
E File "rknn/api/rknn_base.py", line 734, in rknn.api.rknn_base.RKNNBase._build
E File "rknn/base/ovxconfiggenerator.py", line 207, in rknn.base.ovxconfiggenerator.generate_vx_config_from_files
E File "rknn/api/rknn_log.py", line 312, in rknn.api.rknn_log.RKNNLog.e
E ValueError: Generate nbg failed.
Build yolov4 failed!