question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Need tuning suggestions

See original GitHub issue

Hi all, I’m trying to train a model with ~1K and ~5K images. So far model is collapsing, or this is what I understand from output.

I tried first with 1K , following parameters and 150K epochs: stylegan2_pytorch --aug_prob 0.25 --attn_layers [1,2]

And got: image

Then I tried with ~5K, following parameters and 150K epochs: stylegan2_pytorch --aug_prob 0.25 --attn_layers [1,2]

And got: image

What do you suggest to do to improve results? Cleaning dataset? There are a lot of parameters to try and by reading other threads cl_reg and trunc_psi are suggested but by using them, the images start to get worse. Right now I’m trying to reduce batch_size to 3 and increase network_capacity to 32

These are the parameters by default I think I could tune:

data = './data' 
results_dir = './results'
models_dir = './models'
name = 'default'
new = False
load_from = -1
image_size = 128
network_capacity = 16
transparent = False
batch_size = 5 
gradient_accumulate_every = 6
num_train_steps = 150000
learning_rate = 2e-4
lr_mlp = 0.1
ttur_mult = 1.5
num_workers =  None
save_every = 1000
generate = False
generate_interpolation = False
save_frames = False
num_image_tiles = 8
trunc_psi = 0.75
fp16 = False
cl_reg = False
fq_layers = []
fq_dict_size = 256
attn_layers = []
no_const = False
aug_prob = 0. 
dataset_aug_prob = 0. 

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
lucidrainscommented, Aug 24, 2020

Please try https://github.com/lucidrains/unet-stylegan2 ! And yes, up the network capacity and make sure the batch size x gradient accumulate is at least 32

3reactions
lucidrainscommented, Aug 24, 2020

yup, keep attention and aug prob! dataset aug prob augments the images immediately when they are fetched from the file system, and not when it is fed to the discriminator. the former is not differentiable while the latter is

Read more comments on GitHub >

github_iconTop Results From Across the Web

7 Tuning Tips - Fender Guitars
Always Tune Up. Tune each string by tuning down slightly, then tuning back up to reach the note you need to hit. Adding...
Read more >
Auto Tuning: The Complete Guide for Beginners & Pros
What should you consider when tuning your car? Our guide explains! With specialist knowledge from the BILSTEIN experts, for beginners and ...
Read more >
The ultimate guitar tuning guide: expand your mind with these ...
The ideas below, when combined, help you know what you want, and should allow you to near-optimally tune virtually any guitar.
Read more >
Beginners guide to tuning | TUNING - HKS
What is tuning? ... What are the factors to consider when tuning? HKS considers "Tuning" as improvement of vehicle overall performance in response...
Read more >
How To Tune a Guitar: Easy Beginner's Guide | Take Lessons
Learn how to tune a guitar with our easy beginner's guide. We cover everything you'll need to know to tune your guitar properly....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found