Work around "import tensorflow.train" bug.
parent
02205e034f
commit
5c9957065b
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue