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.

Checkpoint key error when finetuning

See original GitHub issue

I have converted stylegan2-ffhq-config-f.pkl from official repo to using, then converted my dataset with

After that I am running this command: python --finetune_loc 2 --ckpt ./data_processed/ to finetune on my dataset but getting error:

load model: Traceback (most recent call last): File "", line 439, in <module> generator.load_state_dict(ckpt["g"], strict=False) KeyError: 'g'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

bryandleecommented, Oct 8, 2020

Hi, the flags --gen and --disc are needed for the conversion.

Also, if you want to finetune from the converted checkpoint then you might need to convert the optimizer parameters as well. Check out the issue from the original repo:

bryandleecommented, Nov 7, 2020

Hi, I haven’t managed to train the 1024 model either. I guess the pytorch implementation of StyleGAN2 takes more gpu memories than the original one?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error finetuning from pretrained checkpoint · Issue #30 - GitHub
Hi all, I'm running into an error when trying to fine-tune from one of the pretrained checkpoints. Code !mkdir "$output" !wget -q -O ......
Read more >
Unable to read from a tensorflow checkpoint for finetuning
But when I give the checkpoint of the pre-trained model, it is showing that "Key output_bias not found in checkpoint". I thought it...
Read more >
KeyError: 'loss' when fine-tuning a Transformer model
I am trying to fine tune a transformer model on my own unlabeled corpus of text. My code for doing this is: from...
Read more >
How to Checkpoint Deep Learning Models in Keras
In this post, you will discover how to checkpoint your deep learning models during training in Python using the Keras library.
Read more >
Transfer learning and fine-tuning | TensorFlow Core
A key advantage of that second workflow is that you only run the base model once on your data, rather than once per...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found