CycleGAN-Keras
CycleGAN-Keras copied to clipboard
Generator bug?
Hello,
I am trying to train the model using the data generator instead of fitting all data in the memory. I am not sure if I get this right, but I think that the model keeps feeding the whole dataset in the memory despite of setting self.use_data_generator = True.
I think the problem is in the following part of code (L190-204 in model.py):
if self.use_data_generator:
self.data_generator = load_data.load_data(
nr_of_channels=self.channels, batch_size=self.batch_size, generator=True, subfolder=image_folder)
# Only store test images
nr_A_train_imgs = 0
nr_B_train_imgs = 0
data = load_data.load_data(nr_of_channels=self.channels,
batch_size=self.batch_size,
nr_A_train_imgs=nr_A_train_imgs,
nr_B_train_imgs=nr_B_train_imgs,
nr_A_test_imgs=nr_A_test_imgs,
nr_B_test_imgs=nr_B_test_imgs,
subfolder=image_folder)
Although a generator is created initially, the command data = load_data.load_data(...) tries to load the whole dataset. Is there a bug or have I misunderstood something?