This file contains 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
import tensorflow.keras as tfk | |
import numpy as np | |
class DataGenerator(tfk.utils.Sequence): | |
'Generates data for Keras' | |
def __init__(self, batches_per_epoch, X, masks, Y): | |
'Initialization' | |
self.batches_per_epoch = batches_per_epoch | |
self.X = X | |
self.masks = masks |