Work around "import tensorflow.train" bug.
parent
5c9957065b
commit
2913a17508
|
@ -889,7 +889,7 @@
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"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",
|
"# so we work around it by writing \"X = tf.train.X\"\n",
|
||||||
"#from tensorflow.train import BytesList, FloatList, Int64List\n",
|
"#from tensorflow.train import BytesList, FloatList, Int64List\n",
|
||||||
"#from tensorflow.train import Feature, Features, Example\n",
|
"#from tensorflow.train import Feature, Features, Example\n",
|
||||||
|
@ -1152,7 +1152,12 @@
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"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",
|
"\n",
|
||||||
"context = Features(feature={\n",
|
"context = Features(feature={\n",
|
||||||
" \"author_id\": Feature(int64_list=Int64List(value=[123])),\n",
|
" \"author_id\": Feature(int64_list=Int64List(value=[123])),\n",
|
||||||
|
|
Loading…
Reference in New Issue