Comments (11)
@rosinality
It seems that truncation trick in W space is not used during training:
style-based-gan-pytorch/train.py
Line 161 in b6898ed
here's what I got when running pretrained 256px model without truncation :
here's with truncation (unchanged generate.py
):
Apparently, images without truncation are in poor qualities. Why does this happen? Is it because that the pretrained model needs more training? Or we can only generate images using truncation tricks?
Thank you
from style-based-gan-pytorch.
It is used for style truncation to reduce deviations of styles from calculated mean styles.
from style-based-gan-pytorch.
Did you try code like this:
normal_distribution = torch.distributions.normal.Normal(0.5, 0.1)
input = normal_distribution.sample(sample_shape=(1,512)).clamp(min=0.3, max=0.7)
style = generator.style(input)[0].to(device))
0.1 , 0.3 and 0.7 - parameters for tuning deviations.
from style-based-gan-pytorch.
I haven't, would it better than truncation on the latent codes from mlp?
from style-based-gan-pytorch.
I correct code above. I suggest it after reading this https://github.com/soumith/ganhacks#3-use-a-spherical-z .
from style-based-gan-pytorch.
The basic idea is to sample from a normal distribution very close to 0.5.
from style-based-gan-pytorch.
@rentonliu I think longer training will help, as the intuition of the truncation trick is that image quality is poor because of less training in the areas that has low probabilities.
from style-based-gan-pytorch.
Can you please clarify what do you mean by areas that has low proabiliites ?
from style-based-gan-pytorch.
Some area of noise spaces has relatively lower probability than rest of the spaces. So during training samples from that area will receive less training signals because of less samples came from that area. So quality of samples from that area will be lower than higher probability area. Truncation trick is used for pull samples from these lower probability area to the mean of latent spaces.
from style-based-gan-pytorch.
By noise spaces are you referring to the gaussian noise injected during training or the latent distribution ?
from style-based-gan-pytorch.
@rsn870 Basically for noise inputs to mlp, but I think latent distributions from mlp also behave similarly.
from style-based-gan-pytorch.
Related Issues (20)
- Some confusing HOT 4
- .
- Image not visible properly and 512 model also giving output of (256,256) plz help HOT 1
- Using class data on input
- What does mean_style & n_source & n_target mean? HOT 8
- generate new images from checkpoints HOT 2
- Reducing the number of channels
- Question on NoiseInjection HOT 1
- Question on projecting generated images back to latent space HOT 2
- Question about checkpoints license
- Train script issue
- RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation HOT 5
- about the image size HOT 4
- training error HOT 1
- About continue training
- About strange sample.png HOT 3
- About the comment of the codes
- Training error
- 我长期研究和改进GAN,如果对GAN或者深度学习感兴趣的可以联系我,联系方式,wechat: lovedaixiaobaby
- channel error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from style-based-gan-pytorch.