Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class DataGenerator(Sequence):
- 'Generates data for Keras'
- def __init__(self, list_IDs, labels, image_path, mask_path,
- to_fit=True, batch_size=32, dim=(256,256),
- n_channels=1, n_classes=10, shuffle=True):
- 'Initialization'
- self.list_IDs = list_IDs
- self.labels = labels
- self.image_path = image_path
- self.mask_path = mask_path
- self.to_fit = to_fit
- self.batch_size = batch_size
- self.dim = dim
- self.n_channels = n_channels
- self.n_classes = n_classes
- self.shuffle = shuffle
- self.on_epoch_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement