Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training questions #9

Open
ScriptingShogun opened this issue May 22, 2015 · 11 comments
Open

Training questions #9

ScriptingShogun opened this issue May 22, 2015 · 11 comments

Comments

@ScriptingShogun
Copy link

Took me a while to get everything installed and working. Right now I am doing noise training with about 300 images. It is currently on run #53. Just curious if there is a set number of runs it goes through?

@nagadomi
Copy link
Owner

training step runs #200 epochs by default.

@an-electric-sheep
Copy link

Another question about training: does the batch_size make any quality difference or is it just for performance tuning?

@nagadomi
Copy link
Owner

In waifu2x, computing performance mostly not influenced by batch_size (but slow performance when batch_size=1).
I recommend small batch_size (2~4).
small batch_size: low memory usage. fast convergence. reducing over tting.

NOTICE: waifu2x is using Adam for CNN training (http://arxiv.org/abs/1412.6980)

@drdaxxy
Copy link

drdaxxy commented Jun 4, 2015

I have another question: how long did the entire training process take for your training set?

@nagadomi
Copy link
Owner

nagadomi commented Jun 5, 2015

2x scaling model: 16 hours
Noise reduction model: 28 hours * 2
Total: around 72 hours
(on GTX760, 3000 images)

@c0d3rman
Copy link

c0d3rman commented Aug 3, 2015

The facts brought up here (how long training takes, batch size recommendation, epochs to training end) should be added to the documentation - they would be EXTREMELY useful to someone like me trying to train their own model.

@djdjoko
Copy link

djdjoko commented Nov 12, 2015

Could you please let me know how many iterations did you train it for? Also did you use all the current default settings when training your anime model?

@nagadomi
Copy link
Owner

See https://github.com/nagadomi/waifu2x/blob/master/train.sh
The default setting is defined at https://github.com/nagadomi/waifu2x/blob/master/lib/settings.lua
I was used 3000 images for training.

And I'm currently running the traning script for the next version using dev branch code and 6000 images.

@djdjoko
Copy link

djdjoko commented Nov 15, 2015

Thanks! Could you share what the next version is and what the differences are?

@nagadomi
Copy link
Owner

I released new version yesterday.
Summary of difference in training script:

  • Add data compression method for on-memory image (reducing memory usage for dataset)
  • Change loss function (MSE to Customized Huber Loss)
  • Improve some image processing functions
  • Add some data augmentation methods
  • Tuning default parameters
  • Improve code readability
  • Improve training time (4x~ faster)

Sorry, my english skill is very poor. Please refer the code for more details.

@nagadomi nagadomi reopened this Nov 16, 2015
@djdjoko
Copy link

djdjoko commented Dec 1, 2015

I would like to ask you a hypothetical question. If I have only one specific type of image I want to scale up, would it be possible to train the algorithm only on one perfect image with maximum resolution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants