tf.data.TFRecordDataset and numpy()

Hello.

# Decode the first record and print output

for tfrecord in dataset.take(1):
  serialized_example = tfrecord.numpy()
  example = tf.train.Example()
  example.ParseFromString(serialized_example)
  pp.pprint(example)

I’m curious, why method numpy() returning byte string but not numpy? Why it’s not called tostring() instead?

Python usually doesn’t use toString(). It’s more in line with java. That said, please raise a ticket on the tensorflow repo so that the project developers / maintainers can provide better guidance on their design choices.