hahnyuan / nn_tools

Neural Network Tools: Converter and Analyzer. For caffe, pytorch, draknet and so on.
MIT License
355 stars 63 forks source link

caffe2csv kernel_size issue #10

Closed avspavan closed 5 years ago

avspavan commented 5 years ago

Hi,

I think there is a bug in the caffe 2 csv converter. The self.kernel_size is of size 1 instead of 2, for example. So i had to put a hack to make it work here (self.kernel_size[0], self.kernel_size[0]): https://github.com/hahnyuan/nn_tools/blob/master/analysis/CaffeA.py#L20.

Thanks, Pavan

hahnyuan commented 5 years ago

Hi, Thanks for your remind. The type of kernel_size is <class google.protobuf.pyext._message.RepeatedScalarContainer'>, When one of the prototxt's kernel_size is omitted, there should be a AssertionError. I have changed the assertion logic to solve this problem.

Zhihang