Skip to content
This repository was archived by the owner on Dec 2, 2021. It is now read-only.

Commit 73b0384

Browse files
Kyle Stewart-FrantzKyle Stewart-Frantz
Kyle Stewart-Frantz
authored and
Kyle Stewart-Frantz
committed
fix calls to save_networks, and load_networks, have strides actually …
1 parent 2ec8478 commit 73b0384

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

code/model_training.ipynb

+6-5
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
" return output_layer\n",
9090
"\n",
9191
"def conv2d_batchnorm(input_layer, filters, kernel_size=3, strides=1):\n",
92-
" output_layer = layers.Conv2D(filters=filters, kernel_size=kernel_size, strides=1, \n",
92+
" output_layer = layers.Conv2D(filters=filters, kernel_size=kernel_size, strides=strides, \n",
9393
" padding='same', activation='relu')(input_layer)\n",
9494
" \n",
9595
" output_layer = layers.BatchNormalization()(output_layer) \n",
@@ -325,7 +325,7 @@
325325
"source": [
326326
"# Save your trained model weights\n",
327327
"weight_file_name = 'model_weights'\n",
328-
"model_tools.save_network(weight_file_name)"
328+
"model_tools.save_network(model, weight_file_name)"
329329
]
330330
},
331331
{
@@ -352,7 +352,8 @@
352352
"source": [
353353
"# If you need to load a model which you previously trained you can uncomment the codeline that calls the function below.\n",
354354
"\n",
355-
"# model_tools.load_network(weight_file_name)"
355+
"# weight_file_name = 'model_weights'\n",
356+
"# restored_model = model_tools.load_network(weight_file_name)"
356357
]
357358
},
358359
{
@@ -529,7 +530,7 @@
529530
],
530531
"metadata": {
531532
"kernelspec": {
532-
"display_name": "Python [default]",
533+
"display_name": "Python 3",
533534
"language": "python",
534535
"name": "python3"
535536
},
@@ -543,7 +544,7 @@
543544
"name": "python",
544545
"nbconvert_exporter": "python",
545546
"pygments_lexer": "ipython3",
546-
"version": "3.5.2"
547+
"version": "3.6.2"
547548
},
548549
"widgets": {
549550
"state": {},

0 commit comments

Comments
 (0)