Search code examples
machine-learningdeep-learningpytorchgenerative-adversarial-networkstylegan

Stylegan3: How to save specific tick state in a file and resume training from that file?


I'm using Google Colab to train Stylegan3 on my data. I can resume from .pkl file.

But I want to save a specific tick state in a file and then resume training from that file. How can I do it? I've checked PyTorch model saving and resuming but no clue about Stylegan3 tick saving and resuming.

Stylegan3 official repo: https://github.com/NVlabs/stylegan3


Solution

  • The solution is:

    "When you run train.py, one of the options you have is --snap, which is how often (in ticks) you will save snapshots of your trained model, so you can set --snap=100.

    To resume from this tick, they will be saved as network-snapshot-000100.pkl, for example, so again when you run train.py, you use --resume=/path/to/network-snapshot-000100.pkl, where you input the actual path to that .pkl file."

    from https://github.com/NVlabs/stylegan3/issues/67