TransWikia.com

Adding an unused tensor to the model created with the Keras functional API (TensorFlow 2.0)

Stack Overflow Asked by Puk on November 18, 2020

I have some variables I would like to save in a Keras model so that when the model is saved to disk and later loaded, the variables are accessible from the model. However, the model itself doesn’t use these variables: they are intended as hints to the user about what the model does and how to use it.

With the Keras functional API, I don’t see an obvious way to do this. I could add a layer whose only function is to store these variables, but I think I would still need to connect it to the rest of the graph somehow so that it becomes part of the model. Is there a simple way to do this that I am missing, or do I need to use a different API or write these variables to a separate file?

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP