Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. class DataGenerator(Sequence):
  2. 'Generates data for Keras'
  3. def __init__(self, list_IDs, labels, image_path, mask_path,
  4. to_fit=True, batch_size=32, dim=(256,256),
  5. n_channels=1, n_classes=10, shuffle=True):
  6. 'Initialization'
  7. self.list_IDs = list_IDs
  8. self.labels = labels
  9. self.image_path = image_path
  10. self.mask_path = mask_path
  11. self.to_fit = to_fit
  12. self.batch_size = batch_size
  13. self.dim = dim
  14. self.n_channels = n_channels
  15. self.n_classes = n_classes
  16. self.shuffle = shuffle
  17. self.on_epoch_end()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement