Skip to content

Commit 3796656

Browse files
authored
FIX: pdf build for keras lecture (#197)
* FIX: pdf build for keras lecture * remove ipython checkpoints * add to git ignore * remove virtual documents
1 parent 14b6ace commit 3796656

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.DS_Store
22
_build/
33
lectures/_build/
4+
.ipython_checkpoints
5+
.virtual_documents

lectures/keras.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,13 @@ Let's print the final MSE on the cross-validation data.
211211

212212
```{code-cell} ipython3
213213
print("Testing loss on the validation set.")
214-
regression_model.evaluate(x_validate, y_validate)
214+
regression_model.evaluate(x_validate, y_validate, verbose=2)
215215
```
216216

217217
Here's our output predictions on the cross-validation data.
218218

219219
```{code-cell} ipython3
220-
y_predict = regression_model.predict(x_validate)
220+
y_predict = regression_model.predict(x_validate, verbose=2)
221221
```
222222

223223
We use the following function to plot our predictions along with the data.
@@ -265,7 +265,7 @@ Here's the final MSE for the deep learning model.
265265

266266
```{code-cell} ipython3
267267
print("Testing loss on the validation set.")
268-
nn_model.evaluate(x_validate, y_validate)
268+
nn_model.evaluate(x_validate, y_validate, verbose=2)
269269
```
270270

271271
You will notice that this loss is much lower than the one we achieved with
@@ -274,7 +274,7 @@ linear regression, suggesting a better fit.
274274
To confirm this, let's look at the fitted function.
275275

276276
```{code-cell} ipython3
277-
y_predict = nn_model.predict(x_validate)
277+
y_predict = nn_model.predict(x_validate, verbose=2)
278278
```
279279

280280
```{code-cell} ipython3
@@ -290,4 +290,3 @@ fig, ax = plt.subplots()
290290
plot_results(x_validate, y_validate, y_predict, ax)
291291
plt.show()
292292
```
293-

0 commit comments

Comments
 (0)