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

How to set the parameters in *.yml when training a new model #36

Open
neal668 opened this issue Sep 8, 2017 · 3 comments
Open

How to set the parameters in *.yml when training a new model #36

neal668 opened this issue Sep 8, 2017 · 3 comments

Comments

@neal668
Copy link

neal668 commented Sep 8, 2017

`## Basic configuration
style_image: img/snow.jpg # targeted style image
naming: "snow" # the name of this model. Determine the path to save checkpoint and events file.
model_path: models # root path to save checkpoint and events file. The final path would be <model_path>/

Weight of the loss

content_weight: 1.0 # weight for content features loss
style_weight: 200.0 # weight for style features loss
tv_weight: 0.0 # weight for total variation loss

The size, the iter number to run

image_size: 256
batch_size: 4
epoch: 2`

Hi, this is a yml file I want to set for training, I noticed the parameter of style_weight is different in those .yml file you proposed while others are the same. Any suggestions for parameter setting? Thanks a lot

@hzy46
Copy link
Owner

hzy46 commented Sep 8, 2017

style_weight is a hyperparameter for the model. So you can adjust it by observing the generated image. If the generated image is full of patterns in the "style_image", and you can hardly find meaningful contents in it, decrease style_weight. If the content is very clear and without any style, increase style_weight.

@neal668
Copy link
Author

neal668 commented Sep 9, 2017

Thank you for your reply. :)
By the way, would you mind introducing a suggested the number of epoch when training a new model? I tried from 6000 to 11000, the effect is different while quite small.
Another question is do I need to select those "simple" figure as the style one?
Thank you for your time.

@hzy46
Copy link
Owner

hzy46 commented Sep 9, 2017

Epoch is usually 1~2. Maybe you mean 6000~11000 steps?
If you use larger learning rate, you can use less steps. Use the tensorboard to decide whether to stop training.

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

2 participants