Open lccui opened 4 years ago
yolov4: mish to leaky is ok. I0825 16:46:47.052114 9499 net.cpp:257] Network initialization done. unknow layer type yolo unknow layer type yolo save prototxt to prototxt/yolov4-leaky-test.prototxt save caffemodel to caffemodel/yolov4-leaky-test.caffemodel
Do you know the reasons why when I run nnie mapper ./yolov4.cfg,the result is begin net parsing.... end net parsing begin prev optimizing.... Segmentation fault (core dumped)
@@ File "darknet2caffe.py", line 519, in
I too am getting the above error while running the code, does anyone know how to fix this and get the caffe model correctly. @ChenYingpeng @becauseofAI
用python3 的话生成的protoxt文件为空,要修改里面的print为fp.write()
Edit darknet2caffe.py
line 233
, add activation
relu
:
if block['activation'] == 'relu':
activate_layer['type'] = 'ReLU'
relu_param = OrderedDict()
relu_param['negative_slope'] = '0'
activate_layer['relu_param'] = relu_param
elif block['activation'] == 'leaky':
activate_layer['type'] = 'ReLU'
relu_param = OrderedDict()
relu_param['negative_slope'] = '0.1'
activate_layer['relu_param'] = relu_param
elif block['activation'] == 'mish':
activate_layer['type'] = 'Mish'
activate_layer['name'] = 'layer%d-act-mish' % layer_id
yolov4: mish to relu
('upsample:', 119) ('upsample:', 129) unknow layer type yolo unknow layer type yolo unknow layer type yolo Traceback (most recent call last): File "darknet2caffe.py", line 519, in darknet2caffe(cfgfile, weightfile, protofile, caffemodel) File "darknet2caffe.py", line 15, in darknet2caffe save_prototxt(net_info , protofile, region=False) File "/home/lab/soft/darknet2caffe/prototxt.py", line 173, in save_prototxt if layer['type'] != 'Region' or region == True: KeyError: 'type'
yolov4: mish to relu
('upsample:', 119) ('upsample:', 129) unknow layer type yolo unknow layer type yolo unknow layer type yolo Traceback (most recent call last): File "darknet2caffe.py", line 519, in
darknet2caffe(cfgfile, weightfile, protofile, caffemodel)
File "darknet2caffe.py", line 15, in darknet2caffe
save_prototxt(net_info , protofile, region=False)
File "/home/lab/soft/darknet2caffe/prototxt.py", line 173, in save_prototxt
if layer['type'] != 'Region' or region == True:
KeyError: 'type'