Created
August 2, 2020 23:48
-
-
Save thierryherrmann/eebb3ca30a13a477d4764bdec731a7a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # instantiate a new module and save it untrained | |
| module = CustomModule() | |
| save_module(module, model_dir) | |
| del module | |
| print('\n\n========== Reload module ===========') | |
| # the following works also if we reload in another python process | |
| model_dir = 'saved_model' | |
| new_module = tf.keras.models.load_model(model_dir) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment