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

Video transformers - added fixes to enable model load after saving and added HF model & space

Open shivalikasingh95 opened this issue 3 years ago • 4 comments
trafficstars

Hi, I have updated the video transformers example with links to model & space on Hugging Face hub.

While trying to save and re-load the model, I faced few errors. Have added the fixes for those as well.

shivalikasingh95 avatar Aug 04 '22 19:08 shivalikasingh95

Hi @fchollet, would be great if you could take a quick look at this PR whenever you find the time. It has minimal suggested changes.

shivalikasingh95 avatar Oct 02 '22 14:10 shivalikasingh95

Hi, I have updated the video transformers example with links to model & space on Hugging Face hub.

Thanks!

Please remove serialization support, it is not needed for this example and it adds complexity to the code example. If you want to reload a saved model, please use model.save_weights()/load_weights(). You do not need to store the model's architecture in serialized format since you have access to the model's code.

fchollet avatar Oct 02 '22 21:10 fchollet

Hi, I have updated the video transformers example with links to model & space on Hugging Face hub.

Thanks!

Please remove serialization support, it is not needed for this example and it adds complexity to the code example. If you want to reload a saved model, please use model.save_weights()/load_weights(). You do not need to store the model's architecture in serialized format since you have access to the model's code.

Hi @fchollet , makes sense. I had initially added that because I was trying to load the model for inference in a separate script where I didn't have access to the model's code. But within the context of this example, it makes sense to keep the code simple as we already have access to the model's code.

Have removed the serialization support now. Let me know if you'd like me to fix anything else.

shivalikasingh95 avatar Oct 03 '22 08:10 shivalikasingh95

@fchollet Can you have a look at this?

pcoet avatar Aug 16 '23 20:08 pcoet