Skip to content

Commit 73dafa1

Browse files
authored
fix keras import and add pdb debugger example to notebook (#82)
1 parent 090339b commit 73dafa1

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Then install the following into your virtual environment:
1515

1616
- Install [Jupyter](https://jupyter.org/install.html).
1717

18-
- Optionally, install `matplotlib`. (If you're using a conda virtual environment, use `conda install matplotlib`.)
18+
- Optionally, install `pandas` and `matplotlib`. (If you're using a conda virtual environment, use `conda install matplotlib`.)
1919

2020
### Test your installation
2121

workshop_sections/high_level_APIs/mnist_eager_keras-debug.ipynb

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,10 @@
4242
}
4343
},
4444
"colab_type": "code",
45-
"collapsed": true,
4645
"id": "zX-y0FVXrd_l"
4746
},
4847
"outputs": [],
4948
"source": [
50-
"from tensorflow import keras\n",
51-
"\n",
5249
"from tensorflow.python.keras.layers import Dense, Dropout, Activation, Flatten\n",
5350
"from tensorflow.python.keras.layers import Convolution2D, MaxPooling2D"
5451
]
@@ -105,7 +102,7 @@
105102
},
106103
"outputs": [],
107104
"source": [
108-
"from keras.datasets import fashion_mnist\n",
105+
"from tensorflow.python.keras._impl.keras.datasets import fashion_mnist\n",
109106
"\n",
110107
"(x_train, y_train), (x_test, y_test) = fashion_mnist.load_data()\n",
111108
"\n",
@@ -225,13 +222,13 @@
225222
}
226223
},
227224
"colab_type": "code",
228-
"collapsed": true,
229225
"id": "VxmgSrb9118w"
230226
},
231227
"outputs": [],
232228
"source": [
233229
"def loss(model, x, y):\n",
234230
" y_ = model(x)\n",
231+
" # import pdb; pdb.set_trace()\n",
235232
" return tf.losses.sparse_softmax_cross_entropy(labels=y, logits=y_)\n",
236233
"\n",
237234
"\n",
@@ -273,7 +270,6 @@
273270
}
274271
},
275272
"colab_type": "code",
276-
"collapsed": true,
277273
"id": "i1PcGU6n18zz"
278274
},
279275
"outputs": [],
@@ -448,7 +444,6 @@
448444
}
449445
},
450446
"colab_type": "code",
451-
"collapsed": true,
452447
"id": "ruV-pM0Le9G7"
453448
},
454449
"outputs": [],

0 commit comments

Comments
 (0)