Toybrick

标题: caffe 模型转换问题 [打印本页]

作者: guigen80    时间: 2019-3-21 17:03
标题: caffe 模型转换问题
python3 rknn_transform_caffe.py
--> Loading model
E Catch exception when loading caffe model: ./yolo_relu/yolov2_caffe_relu_0_merge_int8.caffemodel!
T Traceback (most recent call last):
T   File "rknn/api/rknn_base.py", line 246, in rknn.api.rknn_base.RKNNBase.load_caffe
T   File "rknn/base/RKNNlib/converter/caffeloader.py", line 958, in rknn.base.RKNNlib.converter.caffeloader.CaffeLoader.load
T   File "rknn/base/RKNNlib/converter/caffeloader.py", line 945, in rknn.base.RKNNlib.converter.caffeloader.CaffeLoader.init_caffe_net
T   File "rknn/base/RKNNlib/converter/caffeloader.py", line 932, in rknn.base.RKNNlib.converter.caffeloader.CaffeLoader.import_caffe_proto
T   File "/usr/lib/python3.5/importlib/__init__.py", line 121, in import_module
T     raise TypeError(msg.format(name))
T TypeError: the 'package' argument is required to perform a relative import for './yolo_relu/gnet_region_deploy_darknet448_voc.prototxt_pb2'
done
--> Building model
E Catch exception when building RKNN model!
T Traceback (most recent call last):
T   File "rknn/api/rknn_base.py", line 459, in rknn.api.rknn_base.RKNNBase.build
T   File "rknn/api/rknn_base.py", line 939, in rknn.api.rknn_base.RKNNBase._quantize
T   File "rknn/base/RKNNlib/console/utils.py", line 7, in rknn.base.RKNNlib.console.utils.get_model_data_file
T   File "/usr/lib/python3.5/posixpath.py", line 122, in splitext
T     return genericpath._splitext(p, sep, None, extsep)
T   File "/usr/lib/python3.5/genericpath.py", line 118, in _splitext
T     sepIndex = p.rfind(sep)
T AttributeError: 'NoneType' object has no attribute 'rfind'
done
E RKNN model data is None, please load model first!



code:
rknn.load_caffe(model="./yolo_relu/yolov2_caffe_relu_0_merge_int8.caffemodel",proto="./yolo_relu/gnet_region_deploy_darknet448_voc.prototxt",blobs="data")





作者: guigen80    时间: 2019-3-22 09:59
有人能帮我看看怎么回事吗?谢谢
作者: guigen80    时间: 2019-3-22 17:50
问题解决了,是我参数输错了,不过我发现它还是不支持reorg层,yolov2无法完成转换




欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3