Skip to content

Commit

Permalink
now using symbolic links for infimnist
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesmartin14 committed Apr 23, 2016
1 parent 42c4197 commit a911537
Show file tree
Hide file tree
Showing 3 changed files with 615 additions and 77 deletions.
24 changes: 12 additions & 12 deletions input_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,19 @@ class DataSets(object):
data_sets.validation = DataSet([], [], fake_data=True)
data_sets.test = DataSet([], [], fake_data=True)
return data_sets

TRAIN_IMAGES = './infimnist-patterns-idx3-ubyte.gz'
TRAIN_LABELS = './infimnist-labels-idx1-ubyte.gz'

TEST_IMAGES = './test10k-patterns.gz'
TEST_LABELS = './test10k-labels.gz'

TRAIN_IMAGES = 'mnist-images.gz'
TRAIN_LABELS = 'mnist-labels.gz'
TEST_IMAGES = 't10k-images.gz'
TEST_LABELS = 't10k-labels.gz'
VALIDATION_SIZE = 5000
train_images = extract_images(TRAIN_IMAGES)
train_labels = extract_labels(TRAIN_LABELS, one_hot=one_hot)
test_images = extract_images(TEST_IMAGES)
test_labels = extract_labels(TEST_LABELS, one_hot=one_hot)
local_file = maybe_download(TRAIN_IMAGES, train_dir)
train_images = extract_images(local_file)
local_file = maybe_download(TRAIN_LABELS, train_dir)
train_labels = extract_labels(local_file, one_hot=one_hot)
local_file = maybe_download(TEST_IMAGES, train_dir)
test_images = extract_images(local_file)
local_file = maybe_download(TEST_LABELS, train_dir)
test_labels = extract_labels(local_file, one_hot=one_hot)
validation_images = train_images[:VALIDATION_SIZE]
validation_labels = train_labels[:VALIDATION_SIZE]
train_images = train_images[VALIDATION_SIZE:]
Expand All @@ -141,4 +142,3 @@ class DataSets(object):
data_sets.validation = DataSet(validation_images, validation_labels)
data_sets.test = DataSet(test_images, test_labels)
return data_sets

Loading

0 comments on commit a911537

Please sign in to comment.