make integrity checks optional
This commit is contained in:
parent
9daa600e85
commit
2e970d6ca4
1 changed files with 3 additions and 2 deletions
|
@ -146,7 +146,7 @@ def batch_flatten(x):
|
||||||
|
|
||||||
|
|
||||||
def prepare(dataset="mnist", return_floats=True, return_onehot=True,
|
def prepare(dataset="mnist", return_floats=True, return_onehot=True,
|
||||||
flatten=False, squeeze_layers=True):
|
flatten=False, squeeze_layers=True, check_integrity=True):
|
||||||
if dataset not in metadata.keys():
|
if dataset not in metadata.keys():
|
||||||
raise Exception(f"Unknown dataset: {dataset}")
|
raise Exception(f"Unknown dataset: {dataset}")
|
||||||
|
|
||||||
|
@ -163,7 +163,8 @@ def prepare(dataset="mnist", return_floats=True, return_onehot=True,
|
||||||
|
|
||||||
for name in images_and_labels:
|
for name in images_and_labels:
|
||||||
download(name)
|
download(name)
|
||||||
validate(name)
|
if check_integrity:
|
||||||
|
validate(name)
|
||||||
|
|
||||||
if npz_existing:
|
if npz_existing:
|
||||||
with np.load(construct_path(npz)):
|
with np.load(construct_path(npz)):
|
||||||
|
|
Loading…
Add table
Reference in a new issue