|
89 | 89 | " return output_layer\n",
|
90 | 90 | "\n",
|
91 | 91 | "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", |
93 | 93 | " padding='same', activation='relu')(input_layer)\n",
|
94 | 94 | " \n",
|
95 | 95 | " output_layer = layers.BatchNormalization()(output_layer) \n",
|
|
325 | 325 | "source": [
|
326 | 326 | "# Save your trained model weights\n",
|
327 | 327 | "weight_file_name = 'model_weights'\n",
|
328 |
| - "model_tools.save_network(weight_file_name)" |
| 328 | + "model_tools.save_network(model, weight_file_name)" |
329 | 329 | ]
|
330 | 330 | },
|
331 | 331 | {
|
|
352 | 352 | "source": [
|
353 | 353 | "# If you need to load a model which you previously trained you can uncomment the codeline that calls the function below.\n",
|
354 | 354 | "\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)" |
356 | 357 | ]
|
357 | 358 | },
|
358 | 359 | {
|
|
529 | 530 | ],
|
530 | 531 | "metadata": {
|
531 | 532 | "kernelspec": {
|
532 |
| - "display_name": "Python [default]", |
| 533 | + "display_name": "Python 3", |
533 | 534 | "language": "python",
|
534 | 535 | "name": "python3"
|
535 | 536 | },
|
|
543 | 544 | "name": "python",
|
544 | 545 | "nbconvert_exporter": "python",
|
545 | 546 | "pygments_lexer": "ipython3",
|
546 |
| - "version": "3.5.2" |
| 547 | + "version": "3.6.2" |
547 | 548 | },
|
548 | 549 | "widgets": {
|
549 | 550 | "state": {},
|
|
0 commit comments