mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-01-14 12:14:36 +01:00
Work around "import tensorflow.train" bug.
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user