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

Tiled-mode for project_images.py and resumable training #9

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

dimitry12
Copy link

This PR contains two improvements:

  • new command-line argument for project_images.py: --no-tiled which allows to switch to factory-default projection into 1x512 dlatents-space (useful for evaluation of "semantic" quality of the model);
  • a tweak in training loop to resume from the latest network-snapshot if one is found in the --result-dir

@dimitry12 dimitry12 requested a review from rolux January 16, 2020 18:41
@rolux
Copy link
Owner

rolux commented Jan 16, 2020

Yes this both makes sense.
I'll try and add it to the next release. There are going to be a few major changes, mostly for video encoding.

Comment on lines +76 to +80
if self.tiled:
dlatent_samples = self._Gs.components.mapping.run(latent_samples, None)[:, :1, :] # [N, 1, 512]
else:
dlatent_samples = self._Gs.components.mapping.run(latent_samples, None) # [N, 18, 512]
self._dlatent_avg = np.mean(dlatent_samples, axis=0, keepdims=True) # [1, 1 or 18, 512]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind explaining the idea behind tiled mode?

Compared to the original repository by Nvidia, I have noticed that @rolux changed this line.
Then you offered to add an argument to toggle between the original line and the line by @rolux.

I suspect tiled mode leads to better projection results, but I don't know why.

@woctezuma
Copy link

Would you mind explaining the idea behind tiled mode? I found your PR while looking for information about this exact change.
I suspect tiled mode leads to better projection results.

That could explain why I get different projection results with Nvidia's original project and this one.

@woctezuma
Copy link

Alright, I discovered this thread #2 and will read about it tomorrow. I think it might contain the answer.

This was referenced Sep 9, 2020
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