Skip to content

Commit f1d245c

Browse files
longjonshelhamer
authored andcommitted
[data] get_mnist.sh rewrite; prevents prompt in tutorial notebooks
1 parent bd6b03f commit f1d245c

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

data/mnist/get_mnist.sh

+7-16
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,10 @@ cd $DIR
66

77
echo "Downloading..."
88

9-
wget --no-check-certificate http://yann.lecun.com/exdb/mnist/train-images-idx3-ubyte.gz
10-
wget --no-check-certificate http://yann.lecun.com/exdb/mnist/train-labels-idx1-ubyte.gz
11-
wget --no-check-certificate http://yann.lecun.com/exdb/mnist/t10k-images-idx3-ubyte.gz
12-
wget --no-check-certificate http://yann.lecun.com/exdb/mnist/t10k-labels-idx1-ubyte.gz
13-
14-
echo "Unzipping..."
15-
16-
gunzip train-images-idx3-ubyte.gz
17-
gunzip train-labels-idx1-ubyte.gz
18-
gunzip t10k-images-idx3-ubyte.gz
19-
gunzip t10k-labels-idx1-ubyte.gz
20-
21-
# Creation is split out because leveldb sometimes causes segfault
22-
# and needs to be re-created.
23-
24-
echo "Done."
9+
for fname in train-images-idx3-ubyte train-labels-idx1-ubyte t10k-images-idx3-ubyte t10k-labels-idx1-ubyte
10+
do
11+
if [ ! -e $fname ]; then
12+
wget --no-check-certificate http://yann.lecun.com/exdb/mnist/${fname}.gz
13+
gunzip ${fname}.gz
14+
fi
15+
done

0 commit comments

Comments
 (0)