Giter VIP home page Giter VIP logo

neuralprocesses's People

Contributors

kasparmartens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

neuralprocesses's Issues

Having trouble replicating your results

Hi Kaspar,

I tried replicating the results in your post in PyTorch, and I'm unable to get even close to the kind of results you display on your blog. I am sure there is an error on my end somewhere, but I have poured over the paper and your code and your blog post and I'm unable to see anything that could be behind it. I had a friend look over my implementation too and were unable to spot anything of substance different.

I have tried as best as possible to follow the architecture and setup of your experiment 1, and I see very different behavior. The code is very simple, It's afterall only a handful of simple nns,

https://github.com/chrisorm/Machine-Learning/blob/ngp/Neural%20GP.ipynb

Some things I witness that you don't seem to see (shown in the notebook):
-My q distribution concentrates (i.e. std goes to 0).

  • Related to above, I see no substantial difference between function samples when extrapolating outside of the data like you seem to.
    -My prior function samples display substantially less variance than yours seem to.

The first led me to suspect an error in my KLD term, but that does not seem to be the case - I unit tested my implementation and I think it is correct. The loss looks good and the network clearly converges.

The second is a bit stranger - do you perhaps use some particular initialization of the weights to draw these samples, over and above setting z ~ N(0,1)?

Would you happen to have any insights as to what may be behind this difference?

Thanks for taking the time to do your post, it has some really great insights into the method!

Chris

KL-divergence sign error

I believe there is a mistake in the way that you calculate the KL-divergence. The log term should be subtracted instead of added.

KLqp_gaussian <- function(mu_q, sigma_q, mu_p, sigma_p){
  sigma2_q <- tf$square(sigma_q) + 1e-16
  sigma2_p <- tf$square(sigma_p) + 1e-16
  temp <- sigma2_q / sigma2_p + tf$square(mu_q - mu_p) / sigma2_p - 1.0 - tf$log(sigma2_p / sigma2_q + 1e-16)
  0.5 * tf$reduce_sum(temp)
}

Relaxing constant sigma assumption

If we wanted to make this bit

# for the toy example, assume y* ~ N(mu, sigma) with fixed sigma
sigma_star <- tf$constant(noise_sd, dtype = tf$float32)
list(mu = mu_star, sigma = sigma_star)

more general, what would be the correct way to do it? Would we try to estimate it from the n_draws draws of each of the y* predictions?

Issue on Gaussian Processes approximation

Hi Kaspar,
Thank you so much for sharing your code! I have implemented a tensorflow version and it works well on sin functions. However, when it comes to the functions sampled from gaussian processes, the prediction cannot capture the complexity of the functions. Have you had similar problem?
Thank you!
Yangg-S

MNIST image completion

Did you try to do the MNIST image completion task with your neural process implementation? I also recently implemented NP (in PyTorch), but I can't get it to work for that task. After seeing your code here, I made a version of my own code that should be ~identical to yours (except in PyTorch). I only did your first experiment, but it worked fine. However, the image completion works no better than my previous implementation. I'd be interested to hear about any results that you had on that task / thoughts on what could be failing there (feel free to close this issue if you aren't interested).

Dimensions for decoder g

Sorry this question might be obvious but I don't understand why n_draws and N_star are taken from [1] from shape. Shouldn't their dimension be taken from [0].

decoder g -- map (z, x*) -> hidden -> y*
-inputs dimensions
-z_sample has dim [n_draws, dim_z]

  • x_star has dim [N_star, dim_x]

n_draws <- z_sample$get_shape()$as_list()[1]
N_star <- tf$shape(x_star)[1]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.