Skip to content

Commit

Permalink
Merge pull request #1 from eslam69/tfrecord_tutorialFix
Browse files Browse the repository at this point in the history
Fix serialize_example() example description
  • Loading branch information
eslam69 authored Mar 19, 2023
2 parents 393d7b6 + d858a0d commit cb94a2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions site/en/tutorials/load_data/tfrecord.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,13 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "XftzX9CN_uGT"
},
"source": [
"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:"
"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:"
]
},
{
Expand All @@ -368,9 +369,8 @@
"source": [
"# This is an example observation from the dataset.\n",
"\n",
"example_observation = []\n",
"\n",
"serialized_example = serialize_example(False, 4, b'goat', 0.9876)\n",
"example_observation = [False, 4, b'goat', 0.9876]\n",
"serialized_example = serialize_example(*example_observation)\n",
"serialized_example"
]
},
Expand Down

0 comments on commit cb94a2d

Please sign in to comment.