Ridurre-Network-Filter-Pruning-Keras icon indicating copy to clipboard operation
Ridurre-Network-Filter-Pruning-Keras copied to clipboard

the size of model become larger

Open zhengmiao1996 opened this issue 5 years ago • 5 comments

As we know resnet50 is 94M, but when I load the model and retrain it for several epochs, it become 280M, I don't know why because I model.summary() the .h5 and see the parameters are same. Thank you very much.

zhengmiao1996 avatar Jul 22 '19 08:07 zhengmiao1996

What is the version of Tensorflow and Keras?

gaborvecsei avatar Jul 28 '19 17:07 gaborvecsei

tensorflow 1.8 and keras 2.24

zhengmiao1996 avatar Jul 29 '19 06:07 zhengmiao1996

Then I would advice to change to the newest version of Tensorflow and try out with that. It is defined in the requirements: https://github.com/gaborvecsei/Ridurre-Network-Filter-Pruning-Keras/blob/master/requirements.txt#L1

With this version it can happen that the keras.backend.clear_session() or the tf.reset_default_graph() does not work reliably: https://github.com/gaborvecsei/Ridurre-Network-Filter-Pruning-Keras/blob/master/ridurre/base_filter_pruning.py#L160

gaborvecsei avatar Jul 29 '19 20:07 gaborvecsei

@zhengmiao1996 at last it works? now i also want to have a try to prune the resnet network

ccsone avatar Dec 03 '19 03:12 ccsone

Has this problem solved? I got the same situation, I have trained the FER plus datasets by your example(model_pruning_example) but use the origin resnet not yours, then I got a 280M model

Lin-N-A-N avatar Apr 16 '20 16:04 Lin-N-A-N