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

Added Colab notebooks for easy training and generation #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tylersuard
Copy link

Added 2 Colab notebooks, one for training and one for generation. colab_generate.py and colab_train.py are modified versions of pretrained_example.py and train.py respectively, modified to work with these 2 colab notebooks.

@Tylersuard Tylersuard changed the title Added Colab notebooks Added Colab notebooks for easy training and generation Apr 18, 2020
@Tylersuard
Copy link
Author

Any movement on this? Please review and approve. I would be proud to say I contributed to this revolutionary repo. It opened my mind to the possibilities of AI.

@ahmedshingaly
Copy link

how can I create stylegan model with (1, 18, 512)
my stylegan model is creating shape (1, 12, 512) and I cannot find the latent space developed by Puzer because of shape difference

in more details:
my model produce shape with (1, 12, 512) using (https://github.com/NVlabs/stylegan)
but when I use stylegan encoder (https://github.com/Puzer/stylegan-encoder) to find latent space it requires (1, 18, 512), do you have any idea how can I produce (1, 18, 512) model shapes instead of (1, 12, 512)?

@ricshaw
Copy link

ricshaw commented Jun 28, 2020

Thank you for providing these colab notebooks, helped me get started training my own models. Do you know if it is possible to condition on a particular class? And how to generate images for a specific class?

@Tylersuard
Copy link
Author

@ahmedshingaly No I do not, sorry!

@ricshaw I'm glad they helped you! The thing about StyleGAN is that it's unsupervised, meaning there are no classes. If you want to generate a certain class of images, you would need to train on images consisting entirely of that class. I could be wrong though: I seem to remember a video online of them selecting certain features, but I am not sure how to do that. Sorry!

@ricshaw
Copy link

ricshaw commented Jun 29, 2020

One more question: do you know how to continue training from an existing checkpoint?

@Tylersuard
Copy link
Author

@ricshaw I'm sorry, but I don't. As near as I can tell, train.py looks for previous "runs" folders and then loads .pkl and .tfrecord files from there.

If you pay for colab pro, you can train for 24 hours straight.

One idea might be:

  1. Train for 24 hours and save your pkl file and tfrecords, anything else you would need to train
  2. Re-open the notebook in a fresh session. Add the tfrecords files and train again for just one epoch or so.
  3. That should have created a "runs" folder. You can add your .pkl files to that... I think

This is just based on what I read in the training/misc.py file

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

Successfully merging this pull request may close these issues.

3 participants