Saafke / EDSR_Tensorflow

TensorFlow implementation of 'Enhanced Deep Residual Networks for Single Image Super-Resolution'.
Apache License 2.0
233 stars 72 forks source link

Questions! #3

Closed rjm135 closed 3 years ago

rjm135 commented 3 years ago

Thanks for sharing the code. I'm studying with you code. I try to run the model with my dataset, but the number of steps only increases to 51. When I train the DVI2K dataset, it goes up to over 10000 steps. What should I do? I modified the main.py file by calculating the calcmean in the data_utils.py. In my data set, the images are 158 x 158. Is the number of steps not going up because of this? If so, should line 104 of run.py be modified differently? line 104 is (step% 1000 = : 0). should I change the number 1000 to 10? Please help me.

Saafke commented 3 years ago

Perhaps you don't have many images in your dataset: it could be that in your case one epoch (each image in your dataset has gone through the network) is only 51 steps. How many images are in your dataset, and which batch-size do you use?

(step% 1000 = : 0). should I change the number 1000 to 10?

This means the program will save the current model and print the loss when that IF statement holds true. So yes, if you only have 51 steps per epoch, it is better to change the 1000 to 10.

rjm135 commented 3 years ago

Thanks for the reply! I'll change it to 10 and continue training.

I used 808 for the train dataset and 101 for validation. The batch size was not adjusted in your model. All of my images are 158x158.

What I am curious about is how the number of steps is determined. My dataset is similar in number to the DIV2K image, but is the step smaller because of the image size?

Saafke commented 3 years ago

If I remember correctly, the images are cut up to make 48x48 patches, which are used for training. So if your images are 158x158, you would have 9 patches per image.

I think (we should double check this) the number of steps are determined by Batchsize Nr of images Patches per image: so this will be much bigger than 51 in your case.

rjm135 commented 3 years ago

I understand! Thanks for answering! I changed cut size and it works good.