Last active
April 20, 2019 04:31
-
-
Save StrikingLoo/aeb3548e84c0568fd492fc6baa6539d8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 10% of the data will automatically be used for validation | |
validation_size = 0.1 | |
img_size = 48 # resize images to be 48x48 | |
num_channels = 3 # RGB | |
sample_size = 8192 #We'll use 8192 pictures (2**13) | |
data = dataset.read_train_sets(train_path, img_size, ['cats'], | |
validation_size=validation_size, | |
sample_size=sample_size) | |
x_train, _, _, _ = data.train.next_batch(7373) #no need to load them in batches | |
x_valid, _, _, _ = data.valid.next_batch(819) # now that tensorflow can do it | |
x_train[0] # array([[[0.6784314 , 0.6784314 , 0.7019608 ], ...) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment