|
@@ -394,5 +394,6 @@ def maybe_download_and_extract():
|
|
|
print()
|
|
|
statinfo = os.stat(filepath)
|
|
|
print('Successfully downloaded', filename, statinfo.st_size, 'bytes.')
|
|
|
-
|
|
|
- tarfile.open(filepath, 'r:gz').extractall(dest_directory)
|
|
|
+ extracted_dir_path = os.path.join(dest_directory, 'cifar-10-batches-bin')
|
|
|
+ if not os.path.exists(extracted_dir_path):
|
|
|
+ tarfile.open(filepath, 'r:gz').extractall(dest_directory)
|