jmiller656 / EDSR-Tensorflow

Tensorflow implementation of Enhanced Deep Residual Networks for Single Image Super-Resolution
MIT License
330 stars 107 forks source link

Question over training method #15

Closed PrathamSoni closed 6 years ago

PrathamSoni commented 6 years ago

In the training procedure it is unclear how the the inputs and image targets are derived. Would you mind explaining the set_data_fn as it is not very clear.

jmiller656 commented 6 years ago

Sorry about that, I did a bit of trickery with function pointers in order to keep data gathering somewhat abstract, in case I (or someone else) wanted to do something differently. Basically you use set_data_fn to give the model a reference to a function and arguments for the train and test sets, which will be called in order to gather batches of data during training. The arguments to be passed in will be a tuple representing the arguments to be passed into the function during training. You can see these functions being used in lines 206 and 212 of model.py. I use the splat operation (asterisk) in order to use the arguments in the function