Created
August 17, 2019 13:59
-
-
Save dipanjanS/aec5c55eb09183801b54ac8f7f0ef2cf 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
# building sample data generator | |
sample_generator = train_datagen.flow_from_directory(directory=TRAIN_DIR, | |
classes=['brightpixel', 'narrowband', | |
'narrowbanddrd', 'noise', | |
'squarepulsednarrowband', 'squiggle', | |
'squigglesquarepulsednarrowband'], | |
target_size=IMG_DIMS, | |
batch_size=1, | |
class_mode='categorical', | |
interpolation='bicubic', | |
shuffle=True, seed=42) | |
sample = [next(sample_generator) for i in range(0,5)] | |
# viewing sample signal data | |
fig, ax = plt.subplots(1,5, figsize=(16, 6)) | |
print('Labels:', [list(item[1][0]) for item in sample]) | |
l = [ax[i].imshow(sample[i][0][0]) for i in range(0,5)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment