From 5c9957065bece29c3c812ac1df7586bd0740c3c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Geron?= Date: Sat, 12 Oct 2019 17:38:40 +0930 Subject: [PATCH] Work around "import tensorflow.train" bug. --- 13_loading_and_preprocessing_data.ipynb | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/13_loading_and_preprocessing_data.ipynb b/13_loading_and_preprocessing_data.ipynb index 235d271..b39f00e 100644 --- a/13_loading_and_preprocessing_data.ipynb +++ b/13_loading_and_preprocessing_data.ipynb @@ -889,8 +889,16 @@ "metadata": {}, "outputs": [], "source": [ - "from tensorflow.train import BytesList, FloatList, Int64List\n", - "from tensorflow.train import Feature, Features, Example\n", + "# WARNING: there's currently a bug preventing \"from tensorflow.train\"\n", + "# so we work around it by writing \"X = tf.train.X\"\n", + "#from tensorflow.train import BytesList, FloatList, Int64List\n", + "#from tensorflow.train import Feature, Features, Example\n", + "BytesList = tf.train.BytesList\n", + "FloatList = tf.train.FloatList\n", + "Int64List = tf.train.Int64List\n", + "Feature = tf.train.Feature\n", + "Features = tf.train.Features\n", + "Example = tf.train.Example\n", "\n", "person_example = Example(\n", " features=Features(\n", @@ -1724,7 +1732,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.8" + "version": "3.7.4" }, "nav_menu": { "height": "264px",