Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model size? #22

Open
mrgloom opened this issue Feb 8, 2019 · 1 comment
Open

Model size? #22

mrgloom opened this issue Feb 8, 2019 · 1 comment

Comments

@mrgloom
Copy link

mrgloom commented Feb 8, 2019

Here is the code to reproduce result:

import numpy as np
from keras_squeezenet import SqueezeNet
from keras.applications.imagenet_utils import preprocess_input, decode_predictions
from keras.preprocessing import image

model = SqueezeNet()
model.save_weights('model_weights.h5')
model.save('model.h5')

Why model is so big?

du -sh *.h5
4.9M	model.h5
4.9M	model_weights.h5

It's strange, but after running scripts second time I get, what is the reason?

5.9M	model.h5
5.9M	model_weights.h5

In my older Caffe experiments SqeezeNet v1.1 have size 2.9 Mb:
https://github.com/mrgloom/kaggle-dogs-vs-cats-solution

@mrgloom
Copy link
Author

mrgloom commented Feb 8, 2019

Looks like in paper it's 4.8 Mb, so it's comparable:
https://arxiv.org/pdf/1602.07360.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant