As epoch progress validation part slow down extremely. I run the code for 20 epoch. For validation i follow the usual method of “model.eval()” and " with torch.no_grad()". I just calculating PSNR and SSIM in validation without calling backward().
After validation when i switch to “model.train()” part, execution speed is quite good and constant for all the epochs.