TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tfds.units.size_str

View source

Returns a human readable size string.

tfds.units.size_str(size_in_bytes)

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.