Skip to content

Commit 825f658

Browse files
committed
fixed notebook saving and loading code
1 parent f9f31a7 commit 825f658

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*.svg
33
*.npz
44
*.h5
5+
*.keras
56

67
# Byte-compiled / optimized / DLL files
78
__pycache__/

notebooks/MDN-1D-sine-prediction.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
"outputs": [],
114114
"source": [
115115
"# Save model if you want to.\n",
116-
"# model.save(\"MDN-1D-sine-prediction-model.h5\")"
116+
"model.save(\"MDN-1D-sine-prediction-model.keras\")"
117117
]
118118
},
119119
{
@@ -124,7 +124,7 @@
124124
"source": [
125125
"# Load the model if you want to.\n",
126126
"# To load models from file, you need to supply the layer and loss function as custom_objects:\n",
127-
"# 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)})"
127+
"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)})"
128128
]
129129
},
130130
{

0 commit comments

Comments
 (0)