2018-03-14 08:16:14 -07:00
|
|
|
from . import metadata, prepare
|
|
|
|
|
|
|
|
|
2018-03-14 18:10:28 -07:00
|
|
|
headers = ("dataset",
|
|
|
|
"train images shape",
|
|
|
|
"train labels shape",
|
|
|
|
"test images shape",
|
|
|
|
"test labels shape")
|
|
|
|
|
|
|
|
row = "| {:<20} | {:<20} | {:<20} | {:<20} | {:<20} |"
|
|
|
|
|
|
|
|
separators = (":---", "---:", "---:", "---:", "---:")
|
|
|
|
|
|
|
|
print(row.format(*headers))
|
|
|
|
print(row.format(*separators))
|
2018-03-14 17:44:40 -07:00
|
|
|
|
2018-03-14 08:16:14 -07:00
|
|
|
for name in metadata.keys():
|
2018-03-14 17:44:40 -07:00
|
|
|
# verify every dataset, downloading if necessary.
|
2018-03-14 18:10:28 -07:00
|
|
|
# print out the shape table for use in the README.
|
2018-03-14 17:44:40 -07:00
|
|
|
data = prepare(name)
|
2018-03-14 18:10:28 -07:00
|
|
|
row_data = [name.replace("_", "\\_")]
|
|
|
|
row_data += [str(array.shape) for array in data]
|
|
|
|
print(row.format(*row_data))
|