Skip to content

Commit 0e0e6be

Browse files
Merge pull request #12 from christianversloot/check-stl10
Fix #10
2 parents 080339e + 0132b6b commit 0e0e6be

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

extra_keras_datasets/stl10.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,17 @@ def load_data(path="stl10_matlab.tar.gz"):
4747
Tuple of Numpy arrays: `(input_train, target_train),
4848
(input_test, target_test)`.
4949
"""
50+
# Set local .tar.gz path and delete if already available
51+
local_targz_path = "./stl-10"
52+
shutil.rmtree(local_targz_path, ignore_errors=True)
53+
54+
# Download STL-10 dataset
5055
path = get_file(
5156
path, origin=("http://ai.stanford.edu/~acoates/"
5257
"stl10/stl10_matlab.tar.gz")
5358
)
5459

5560
# Temporarily extract .tar.gz in local path
56-
local_targz_path = "./stl-10"
5761
shutil.unpack_archive(path, local_targz_path)
5862

5963
# Load data from Matlab file

0 commit comments

Comments
 (0)