Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tfds.units.size_str

View source on GitHub

Returns a human readable size string.

tfds.units.size_str(
    size_in_bytes
)

If size_in_bytes is None, then returns "Unknown size".

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.