Cloud-CV / Fabrik

:factory: Collaboratively build, visualize, and design neural nets in browser
GNU General Public License v3.0
1.12k stars 235 forks source link

Incorrect parameter count when loading some models after exporting #451

Open thatbrguy opened 5 years ago

thatbrguy commented 5 years ago

Parameter counts are different for some models when you import the same model from prototxt (Caffe) and json (Keras). The count for prototxt is wrong.

Steps to reproduce:

Parameter Counts:

Name Model Zoo Keras Import Caffe Import
Inception V3 23,851,784 23,851,784 30,013,000
Inception V4 42,712,937 42,712,937 47,357,129
Yolo 271,703,550 217,177,598 3,354,516,990
ResNet 101 44,654,504 44,654,504 23,490,158,504

Notes:

  1. I have not tested for all models, so errors may exist in some others as well.
  2. Some models like VGG16 have no errors. As in, parameter counts are equal for Model zoo, Caffe and Keras.
  3. Parameter count in Keras mostly matches the model zoo values, except in Yolo (for the ones I have tested).
  4. Some models have very high error in parameter count in Caffe.
Ram81 commented 5 years ago

Thanks for reporting @thatbrguy

namish800 commented 5 years ago

@Ram81 Can I work on this issue?