From 2913a17508ab4d17f2f81b90f9c9d02bc664e3ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Geron?= Date: Sat, 12 Oct 2019 17:42:41 +0930 Subject: [PATCH] Work around "import tensorflow.train" bug. --- 13_loading_and_preprocessing_data.ipynb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/13_loading_and_preprocessing_data.ipynb b/13_loading_and_preprocessing_data.ipynb index b39f00e..f66c58a 100644 --- a/13_loading_and_preprocessing_data.ipynb +++ b/13_loading_and_preprocessing_data.ipynb @@ -889,7 +889,7 @@ "metadata": {}, "outputs": [], "source": [ - "# WARNING: there's currently a bug preventing \"from tensorflow.train\"\n", + "# WARNING: there's currently a bug preventing \"from tensorflow.train import X\"\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", @@ -1152,7 +1152,12 @@ "metadata": {}, "outputs": [], "source": [ - "from tensorflow.train import FeatureList, FeatureLists, SequenceExample\n", + "# WARNING: there's currently a bug preventing \"from tensorflow.train import X\"\n", + "# so we work around it by writing \"X = tf.train.X\"\n", + "#from tensorflow.train import FeatureList, FeatureLists, SequenceExample\n", + "FeatureList = tf.train.FeatureList\n", + "FeatureLists = tf.train.FeatureLists\n", + "SequenceExample = tf.train.SequenceExample\n", "\n", "context = Features(feature={\n", " \"author_id\": Feature(int64_list=Int64List(value=[123])),\n",