|
使用套件版本V1.6.0
转换 模型代码,使用darknet转rknn
分别测试检测网络和残差网络
检测网络使用yolov3 成功
残差网络使用resnet50 失败
失败原因日志如下:
--> Loading model
W Still not implement cost shape engine
E Do not support the shortcut inputs: [0, 32, 32, 512] [0, 64, 64, 256]
W ----------------Warning(1)----------------
E Catch exception when loading darknet model: ./cifar/cifar.cfg!
E Traceback (most recent call last):
E File "rknn/api/rknn_base.py", line 282, in rknn.api.rknn_base.RKNNBase.load_darknet
E File "rknn/base/RKNNlib/RK_nn.py", line 125, in rknn.base.RKNNlib.RK_nn.RKnn.load_darknet
E File "rknn/base/RKNNlib/converter/convert_darknet.py", line 669, in rknn.base.RKNNlib.converter.convert_darknet.Converter.converte
E File "rknn/base/RKNNlib/converter/convert_darknet.py", line 807, in rknn.base.RKNNlib.converter.convert_darknet.Converter.build_graph
E File "rknn/base/RKNNlib/converter/convert_darknet.py", line 616, in rknn.base.RKNNlib.converter.convert_darknet.NetGenerator.add_layer
E File "rknn/base/RKNNlib/converter/convert_darknet.py", line 508, in rknn.base.RKNNlib.converter.convert_darknet.ShortcutGenerator.gen
E File "rknn/api/rknn_log.py", line 312, in rknn.api.rknn_log.RKNNLog.e
E ValueError: Do not support the shortcut inputs: [0, 32, 32, 512] [0, 64, 64, 256]
Load weights failed!
两个网络模型都使用darknet训练,分别在PC端验证通过
yolov3 和 resnet50 都包含shortcut,发现yolov3 能够正常转换,但是resnet50不行,请问分类网络不支持shortcut网络层么,我看文档里面是支持的呀
文档内容如下
## Darknet OPs supported by RKNN
The list of Darknet OPs supported by RKNN Version 1.6.0 is as follows:
| **Operators** |
|---|
|batchnormalize|
|convolutional|
|depthwise_convolutional|
|pooling|
|fullconnect|
|leakyrelu|
|concat|
|add|
|upsampling|
|reorg|
|noop|
|route|
|region|
|shortcut|
|multiply|
|swish|
|logistic|
|mish|
|softmax|
|
|