Comments (3)
Also for this question. I'm wondering why in the sample
method, the solution populates the samples using normal distributed random variables (which could range from -inf to inf) while the documentation says the sample should be "a numpy array of size (100, H, W, 1) of samples with values in [0, 1], where [0,0.5] represents a black pixel and [0.5,1] represents a white pixel".
samples[:, k, r, c] = torch.normal(loc[torch.arange(n), chosen_centers], log_scale[torch.arange(n), chosen_centers].exp())
from deepul.
I am also confused by this part. I think the weighted sum version is more reasonable.
I still have a question about this nll
function. If my understanding is right, the latent variable here, is from a mixture of gaussians right?
The value that we calculate in nll
function (add the weighted sum part, like you said) is the first part
log(Normal(loc, log_scale.exp()).log_prob(x.unsqueeze(1).repeat(1,1,self.n_components,1,1)).exp() * weights)
what about the second part
What's more, In this case, the network that we are using is PixelCNN, which is a complex flow. Is there really is a way to calculate the second part
I have thought about this for days, Thanks guys!
from deepul.
Also for this question. I'm wondering why in the
sample
method, the solution populates the samples using normal distributed random variables (which could range from -inf to inf) while the documentation says the sample should be "a numpy array of size (100, H, W, 1) of samples with values in [0, 1], where [0,0.5] represents a black pixel and [0.5,1] represents a white pixel".samples[:, k, r, c] = torch.normal(loc[torch.arange(n), chosen_centers], log_scale[torch.arange(n), chosen_centers].exp())
I checked their q2_save_results function in helper2 class. It seems they use the clip function, only keep values in [0,2] range.
samples = np.clip(samples.astype('float') * 2.0, 0, 1.9999)
from deepul.
Related Issues (13)
- Bug in MADE sampling implementation in 'hw1_solutions.ipynb' HOT 1
- `optimizer.zero_grad` called after calculating loss instead of before in `lecture3_flow_models_demos.ipynb`.
- HW1 solutions Discretized Mixture of Logistics Parameter initialization confusion HOT 2
- Is log_det in preprocess function useful? HW2 HOT 1
- Where is HW 4? HOT 1
- Question regarding solutions availability
- clarification question
- HW1 MADE | possible flaws in solution implementaiotn. HOT 2
- Flows demo fails because of missing `.to(ptu.device)` HOT 2
- ActNorm implementation missing division by `std` on the shift parameter
- Reporting bugs/errors in `lecture3_flow_models_demos.ipynb` HOT 4
- What is `self.loc` in `MixtureCDFFlow` class? HOT 1
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 deepul.