- #1
BRN
- 108
- 10
Hi everyone,
I made an implementation of the cycleGAN model but I find a strange problem.
If I run the model with a PC supplied to the university it works, while on Colab, it saves me empty PNG files. Consider that I use a standard GPU on Colab.
This is my code to save the generated images
Some idea?
Thank you.
I made an implementation of the cycleGAN model but I find a strange problem.
If I run the model with a PC supplied to the university it works, while on Colab, it saves me empty PNG files. Consider that I use a standard GPU on Colab.
This is my code to save the generated images
save generated function:
def save_generated(image_ds, label, generator_model, outputs_path):
i = 1
for img in image_ds:
generated = generator_model(img, training = False)[0].numpy()
generated = (generated * 127.5 + 127.5).astype(np.uint8) # re-scale
im = Image.fromarray(generated)
im.save(f'{outputs_path}{str(label)}_fake_image_{str(i)}.png')
i += 1
Some idea?
Thank you.
Last edited by a moderator: