DigitalMediaProfessionals / tool

DV network conversion tool
Apache License 2.0
0 stars 1 forks source link

YOLOv2 prototxt are not parsed correctly #12

Closed ZongHong-Lyu closed 5 years ago

ZongHong-Lyu commented 5 years ago

_yolov2.txt

ZongHong-Lyu commented 5 years ago

On 16/10/2018 09:53, Alexey KAZANTSEV wrote:

The current tool cannot handle original prototxt:

File "../../tool/convertor.py", line 131, in custom_layer, dim_override) File "/home/ajk/dv-sdk/tool/cnn_convertor/cnn_parser.py", line 32, in parse_network parser_caffe.parse_caffe_def(network, network_def) File "/home/ajk/dv-sdk/tool/cnn_convertor/parser_caffe.py", line 192, in parse_caffe_def parse_caffe_def2(network, fin.read()) File "/home/ajk/dv-sdk/tool/cnn_convertor/parser_caffe.py", line 102, in parse_caffe_def2 up_node = top_map[layer.bottom[0]] KeyError: 'conv1_bn'

With removed batchnorm it works, I'll run it on ZCU104.

Best Regards, Alexey

ZongHong-Lyu commented 5 years ago

So the tool now assumes all PReLU, Scale and BatchNorm layers should be in-place layers (so their top = bottom). But for this network, They use different label for input and output blobs, so are not in-place layers.