Skip to content

Instantly share code, notes, and snippets.

David Molina virtualdvid

Block or report user

Report or block virtualdvid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@virtualdvid
virtualdvid / table_4.csv
Last active Jan 15, 2019
Flow from directory with Augmentation: Keras vs Gap
View table_4.csv
Keras: Flow from directory with Augmentation Gap: Flow from directory with Augmentation
PRE-TIME 0.20845842361450195
TIME 143.19440412521362 10.20444941520691
Memory Used: 0.13 GB 0.01 GB
@virtualdvid
virtualdvid / code_11.py
Created Jan 15, 2019
Gap: Flow from directory with Augmentation
View code_11.py
print("Gap: Flow from directory with Augmentation")
dataset = Images(augment=['rotate=-30,30'], config=['stream'])
dataset.load('flowers')
dataset.minibatch = 32
train_generator = dataset.minibatch
start_mem = psutil.virtual_memory().used
start_time = time.time()
@virtualdvid
virtualdvid / code_10.py
Created Jan 15, 2019
Keras: Flow from directory with Augmentation
View code_10.py
print("Keras: Flow from directory with Augmentation")
start_mem = psutil.virtual_memory().used
start_time = time.time()
datagen = ImageDataGenerator(rotation_range=30, rescale=1./255)
train_generator = datagen.flow_from_directory('flowers', target_size=(128,128), batch_size=32)
print("PRE-TIME", time.time() -start_time)
@virtualdvid
virtualdvid / table_3.csv
Created Jan 15, 2019
Flow with Augmentation: Keras vs Gap
View table_3.csv
Keras: Flow with Augmentation Gap: Flow with Augmentation
PRE-TIME 0.4257802963256836 0.0036149024963378906
TIME 54.004902839660645 6.712508916854858
Memory Used: -0.00 GB 0.00 GB
@virtualdvid
virtualdvid / code_9.py
Last active Jan 15, 2019
Gap: Flow with Augmentation
View code_9.py
print("Gap: Flow with Augmentation")
dataset = Images(augment=['rotate=-30,30'])
dataset.load('flowers')
start_mem = psutil.virtual_memory().used
start_time = time.time()
dataset.minibatch = 32
train_generator = dataset.minibatch
@virtualdvid
virtualdvid / code_8.py
Last active Jan 15, 2019
Keras: Flow with Augmentation
View code_8.py
print("Keras: Flow with Augmentation")
datagen = ImageDataGenerator(rotation_range=30)
start_time = time.time()
datagen.fit(X_train)
train_generator = datagen.flow(X_train, Y_train, batch_size=32)
print("PRE-TIME (fit)", time.time() -start_time)
@virtualdvid
virtualdvid / table_2.csv
Created Jan 15, 2019
flow_from_directory Keras vs Gap
View table_2.csv
Keras: flow_from_directory Gap: flow from directory
PRE-TIME 0.20801329612731934 0.01245427131652832
TIME 89.3897156715393 6.902476787567139
Memory Used: 0.00 GB -0.00 GB
@virtualdvid
virtualdvid / code_7.py
Last active Jan 15, 2019
Gap: flow from directory
View code_7.py
print("Gap: flow from directory")
start_mem = psutil.virtual_memory().used
start_time = time.time()
dataset = Images(config=['stream'])
dataset.load('flowers')
dataset.minibatch = 32
train_generator = dataset.minibatch
@virtualdvid
virtualdvid / code_6.py
Last active Jan 15, 2019
Keras: flow_from_directory
View code_6.py
print("Keras: flow_from_directory")
start_mem = psutil.virtual_memory().used
start_time = time.time()
datagen = ImageDataGenerator(rescale=1./255)
train_generator = datagen.flow_from_directory('flowers', target_size=(128,128), batch_size=32)
print("PRE-TIME", time.time() -start_time)
start_time = time.time()
@virtualdvid
virtualdvid / table_1.csv
Created Jan 15, 2019
Flow: Keras vs Gap
View table_1.csv
Keras: Flow Gap: Flow
PRE-TIME 0.38779211044311523 1.8835067749023438e-05
TIME 1.3482673168182373 0.7792487144470215
Memory Used: 1.79 GB -0.00 GB
You can’t perform that action at this time.