Skip to content

Commit

Permalink
fixed notebook saving and loading code
Browse files Browse the repository at this point in the history
  • Loading branch information
cpmpercussion committed May 3, 2024
1 parent f9f31a7 commit 825f658
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.svg
*.npz
*.h5
*.keras

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
4 changes: 2 additions & 2 deletions notebooks/MDN-1D-sine-prediction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"outputs": [],
"source": [
"# Save model if you want to.\n",
"# model.save(\"MDN-1D-sine-prediction-model.h5\")"
"model.save(\"MDN-1D-sine-prediction-model.keras\")"
]
},
{
Expand All @@ -124,7 +124,7 @@
"source": [
"# Load the model if you want to.\n",
"# To load models from file, you need to supply the layer and loss function as custom_objects:\n",
"# model = keras.models.load_model('MDN-1D-sine-prediction-model.h5', custom_objects={'MDN': mdn.MDN, 'loss_func': mdn.get_mixture_loss_func(1, N_MIXES)})"
"model = keras.models.load_model('MDN-1D-sine-prediction-model.keras', custom_objects={'MDN': mdn.MDN, 'mdn_loss_func': mdn.get_mixture_loss_func(1, N_MIXES)})"
]
},
{
Expand Down

0 comments on commit 825f658

Please sign in to comment.