Skip to content

Commit eea8c52

Browse files
Merge pull request #2207 from eslam69:master
PiperOrigin-RevId: 632362693
2 parents 7175b2b + 0fc9db1 commit eea8c52

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

site/en/tutorials/load_data/tfrecord.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@
356356
"id": "XftzX9CN_uGT"
357357
},
358358
"source": [
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 `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:"
360360
]
361361
},
362362
{
@@ -369,10 +369,10 @@
369369
"source": [
370370
"# This is an example observation from the dataset.\n",
371371
"\n",
372-
"example_observation = []\n",
373-
"\n",
374-
"serialized_example = serialize_example(False, 4, b'goat', 0.9876)\n",
375-
"serialized_example.numpy()"
372+
"example_observation = [False, 4, b'goat', 0.9876]\n",
373+
"serialized_example = serialize_example(*example_observation)\n",
374+
"serialized_example"
375+
376376
]
377377
},
378378
{

0 commit comments

Comments
 (0)