Neural Style Transfer Steps

Hello! This is my first post here, so forgive me if this has already been discussed or is in a tutorial, but I am building the tutorial neural style transfer network (here), and I am trying to simply see each 50 steps of the run, which is 300 steps by default in the tutorial. I am just looking to display the resulting image from each 50 steps once the run has been completed.

Again, forgive me if this is well documented, I am very new to coding, pytorch, and neural networks, and any advice or help would be much appreciated!

You can take the image display code (plt. calls before the output image) and move it to after optimizer.step() (also clamp, but don’t overwrite the input_img (so use detach().clamp()).

Best regards