keras-applications icon indicating copy to clipboard operation
keras-applications copied to clipboard

Trained Depthwise mobilenet, but size is h5 file is 24 MB, need to reduce the h5 file size.

Open vasanthhr opened this issue 4 years ago • 1 comments

Hello Team,

I trained Depthwise Mobilenet and got h5 file of size around 24 MB. I converted this h5 file to tensorflow_js supported file format(JSON), and used technique of quantization and finally able to reduce JSON file size to 2.1 MB.

Is there any way I can reduce the h5 files size to some more extent? ( I think i need to remove some layers in architecture level before training, Does it help in reduce file size?).

Please guide me If I need to remove any layers in mobilenet.py or Do I need to make any modifications in configuration in the same file.

(Goal: I need to take JSON file and run it on browser, so need to reduce file size as much as possible),

vasanthhr avatar Jul 29 '19 19:07 vasanthhr

@vasanthhr, Currently the tasks of quantization and compression are out of scope in keras-applications. But if you suggest seamless APIs such as TensorRT supports, we are always welcome. And, the manual removal of some layers doesn't look good to me. It is not generalizable.

taehoonlee avatar Sep 17 '19 00:09 taehoonlee