Closed betterze closed 3 years ago
I haven't tried this myself, but this should be simple to add.
Notice that the logging during validation occurs here:
https://github.com/eladrich/pixel2style2pixel/blob/3e2ebd82bb3e3719507898f365abcec16597061a/training/coach.py#L140-L142
And the images are saved for each batch. Therefore, you can add a parameter for logging (for example opts.val_image_interval
) and then do something like
if batch_idx % self.opts.val_image_interval == 0:
self.parse_and_log_images(id_logs, x, y, y_hat,
title='images/test/faces', subscript='{:04d}'.format(batch_idx))
If I am not mistaken, this will save an image every val_image_interval
batches.
Thx a lot, I will try it.
Dear PSP encoder team,
Thank you for sharing this great work, it performs really well.
Is there a well to control number of log images? If I just want o show the test images progress for a few images (maybe 10), instead of the whole test set, is there a way to do this?
Currently, 'image_interval' control the train images interval, 'val_interval' control the test images interval. But for each interval, it uses a lot of images, and it always use too much disk space, I can not even open the folder.
Thank you for your help.
Best Wishes,
Alex