TensorFlow 2.0 Beta is available Learn more

tfds.units.size_str

Returns a human readable size string.

tfds.units.size_str(size_in_bytes)

View source

If size_in_bytes is None, then returns "?? GiB".

For example size_str(1.5 * tfds.units.GiB) == "1.50 GiB".

Args:

  • size_in_bytes: int or None, the size, in bytes, that we want to format as a human-readable size string.