Skip to content

Commit 8c9237b

Browse files
committed
test ch13 on Tf 1.9
1 parent ef6c60f commit 8c9237b

File tree

2 files changed

+113
-153
lines changed

2 files changed

+113
-153
lines changed

code/ch13/ch13.ipynb

Lines changed: 101 additions & 134 deletions
Large diffs are not rendered by default.

code/ch13/ch13.py

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,6 @@
1111
import struct
1212
import tensorflow.contrib.keras as keras
1313

14-
# NOTE:
15-
# ================================================
16-
# If you have TensorFlow >= v1.4 installed
17-
# you can use the keras API directly instead
18-
# of importing it from the contrib module
19-
# for instance, in this code cell, you can skip
20-
# the import, and following code cells,
21-
# you can use
22-
# `tf.keras.utils.to_categorical(y_train)`
23-
# instead of `keras.utils.to_categorical(y_train)`
24-
# and so forth.
25-
26-
27-
2814
# *Python Machine Learning 2nd Edition* by [Sebastian Raschka](https://sebastianraschka.com) and Vahid Mirjalili, Packt Publishing Ltd. 2017
2915
#
3016
# Code Repository: https://github.com/rasbt/python-machine-learning-book-2nd-edition
@@ -479,6 +465,18 @@ def create_batch_generator(X, y, batch_size=128, shuffle=False):
479465

480466

481467

468+
# NOTE:
469+
# ================================================
470+
# If you have TensorFlow >= v1.4 installed
471+
# you can use the keras API directly instead
472+
# of importing it from the contrib module
473+
# for instance, in this code cell, you can skip
474+
# the import, and following code cells,
475+
# you can use
476+
# `tf.keras.utils.to_categorical(y_train)`
477+
# instead of `keras.utils.to_categorical(y_train)`
478+
# and so forth.
479+
482480
np.random.seed(123)
483481
tf.set_random_seed(123)
484482

@@ -682,8 +680,3 @@ def tanh(z):
682680

683681

684682

685-
686-
687-
688-
689-

0 commit comments

Comments
 (0)