Comments (4)
Can you please point to the line of the code in question?
from diffae.
I believe the line 403-416 was not used in DiffAE at all, and hence not related to DiffAE. It was a legacy code from the base repo that we built upon.
Regarding your second question, 0.3*sqrt(512)
. 0.3 is definitely tuned by hand based on qualitative results. sqrt(512)
is related to the fact that F.normalize(cls_model.classifier.weight[cls_id][None, :], dim=1)
is a unit vector (which is rather small, and depends on the number of dims). It's nice to have something that scales with dims (make the coefficient more robust). I think a Gaussian random vector with 512 dimensions has the norm of sqrt(512)
, multiplying a unit vector with sqrt(512)
scales it as though it has the same size as a random Gaussian vector.
from diffae.
Thanks for your reply.
Yes of course. The condition_mean method is Line 403-416 in base.py
Also in the manipulate case:
cond2 = cond2 + 0.3 * math.sqrt(512) * F.normalize(cls_model.classifier.weight[cls_id][None, :], dim=1)
could you please share how you determine the coefficient (0.3*sqrt(512))?
Thanks for your help!
from diffae.
Really appreciate your reply.
But I think line 403-416 actually used in img = model.render(xT, cond2, T=100) from block[33] of manipulate.ipynb.
In which the render method can be conditioned based on cond_fn. But I don't find anywhere cond_fn be defined.
So could you please provide me some clue on how to implement this conditional render?
Thank you!
from diffae.
Related Issues (20)
- Why use zero_module? HOT 2
- Configuration of the experiment -- attribute manipulation on real images HOT 4
- what is the input of conditional DDIM decoder? HOT 6
- how to visualize the reconstruction result
- Inquiry about using Guided-Diffusion parameters HOT 2
- I got the issue about lmdb: lmdb.Error: ffhq256.lmdb: No such file or directory HOT 7
- Regarding the error I met when I try to run the run_bedroom128.py HOT 4
- Difference in Model Weights HOT 1
- I cannot access to URL for converting the datasets to LMDB format
- Extensive GPU Usage for Manipulation HOT 1
- Issues with Conditional Sampling HOT 3
- about the partition of training and validation sets HOT 1
- It looks like z-sem is not being trained HOT 9
- an error occurred during evaluation. HOT 3
- the setting of use_inverted_noise
- Retraining for getting higher resolution Image
- Checkpoint
- log_sample after the batch training HOT 1
- How is the autoencoding happening in the code during inference?
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 diffae.