Skip to content

Commit d858a0d

Browse files
committed
Fix serialize_example() example description
1 parent 393d7b6 commit d858a0d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

site/en/tutorials/load_data/tfrecord.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,13 @@
350350
]
351351
},
352352
{
353+
"attachments": {},
353354
"cell_type": "markdown",
354355
"metadata": {
355356
"id": "XftzX9CN_uGT"
356357
},
357358
"source": [
358-
"For example, suppose you have a single observation from the dataset, `[False, 4, bytes('goat'), 0.9876]`. You can create and print the `tf.train.Example` message for this observation using `create_message()`. Each single observation will be written as a `Features` message as per the above. Note that the `tf.train.Example` [message](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/example/example.proto#L88) is just a wrapper around the `Features` message:"
359+
"For example, suppose you have a single observation from the dataset, `[False, 4, bytes('goat'), 0.9876]`. You can create and print the `tf.train.Example` message for this observation using `serialize_example()`. Each single observation will be written as a `Features` message as per the above. Note that the `tf.train.Example` [message](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/example/example.proto#L88) is just a wrapper around the `Features` message:"
359360
]
360361
},
361362
{
@@ -368,9 +369,8 @@
368369
"source": [
369370
"# This is an example observation from the dataset.\n",
370371
"\n",
371-
"example_observation = []\n",
372-
"\n",
373-
"serialized_example = serialize_example(False, 4, b'goat', 0.9876)\n",
372+
"example_observation = [False, 4, b'goat', 0.9876]\n",
373+
"serialized_example = serialize_example(*example_observation)\n",
374374
"serialized_example"
375375
]
376376
},

0 commit comments

Comments
 (0)