-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
46 lines (37 loc) · 1.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Utilities for cloning test data, etc.
# Directories for cloning data.
TESTDATA := $(PWD)/testdata
MNIST := $(TESTDATA)/mnist
FASHION := $(TESTDATA)/mnist-fashion
.PHONY: all
all: \
mnist \
fashion
.PHONY: clean
clean:
rm -rf $(TESTDATA)
# Information: http://yann.lecun.com/exdb/mnist/
# Download: https://deepai.org/dataset/mnist
.PHONY: mnist
mnist: $(MNIST)/train-labels-idx1-ubyte.gz
$(MNIST)/train-labels-idx1-ubyte.gz: \
$(PWD)/testdata/mnist/mnist.zip
unzip -u -d $(dir $@) $<
$(MNIST)/mnist.zip:
mkdir -p $(dir $@)
curl -fsSL https://data.deepai.org/mnist.zip -o $@
# Information: https://github.com/zalandoresearch/fashion-mnist
.PHONY: fashion
fashion: \
$(FASHION)/train-images-idx3-ubyte.gz \
$(FASHION)/train-labels-idx1-ubyte.gz \
$(FASHION)/t10k-images-idx3-ubyte.gz \
$(FASHION)/t10k-labels-idx1-ubyte.gz
# NOTE: It appears that https is not supported.
FASHION_BASE_URL := http://fashion-mnist.s3-website.eu-central-1.amazonaws.com
$(FASHION)/%.gz:
mkdir -p $(dir $@)
curl -fsSL $(FASHION_BASE_URL)/$(notdir $@) -o $@
# Expected md5 hash values available here:
# https://github.com/zalandoresearch/fashion-mnist#get-the-data
md5sum $@