mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-01-31 12:07:49 +01:00
Remove 'from tensorflow import keras'
This commit is contained in:
@@ -209,7 +209,6 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"from tensorflow import keras\n",
|
|
||||||
"K = tf.keras.backend\n",
|
"K = tf.keras.backend\n",
|
||||||
"K.square(K.transpose(t)) + 10"
|
"K.square(K.transpose(t)) + 10"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -73,7 +73,6 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"# TensorFlow ≥2.6 is required\n",
|
"# TensorFlow ≥2.6 is required\n",
|
||||||
"import tensorflow as tf\n",
|
"import tensorflow as tf\n",
|
||||||
"from tensorflow import keras\n",
|
|
||||||
"assert tf.__version__ >= \"2.6\"\n",
|
"assert tf.__version__ >= \"2.6\"\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# to make this notebook's output stable across runs\n",
|
"# to make this notebook's output stable across runs\n",
|
||||||
@@ -1057,7 +1056,6 @@
|
|||||||
"\n",
|
"\n",
|
||||||
"import numpy as np\n",
|
"import numpy as np\n",
|
||||||
"import tensorflow as tf\n",
|
"import tensorflow as tf\n",
|
||||||
"from tensorflow import keras\n",
|
|
||||||
"import time\n",
|
"import time\n",
|
||||||
"\n",
|
"\n",
|
||||||
"# At the beginning of the program\n",
|
"# At the beginning of the program\n",
|
||||||
@@ -1181,8 +1179,6 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"from tensorflow import keras\n",
|
|
||||||
"\n",
|
|
||||||
"model = tf.keras.models.load_model(\"my_mnist_multiworker_model.h5\")\n",
|
"model = tf.keras.models.load_model(\"my_mnist_multiworker_model.h5\")\n",
|
||||||
"Y_pred = model.predict(X_new)\n",
|
"Y_pred = model.predict(X_new)\n",
|
||||||
"np.argmax(Y_pred, axis=-1)"
|
"np.argmax(Y_pred, axis=-1)"
|
||||||
|
|||||||
Reference in New Issue
Block a user