Work around "import tensorflow.train" bug.

main
Aurélien Geron 2019-10-12 17:42:41 +09:30
parent 5c9957065b
commit 2913a17508
1 changed files with 7 additions and 2 deletions

View File

@ -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",