Giter VIP home page Giter VIP logo

sgld's Introduction

Physics - a Gateway to Bayesian Deep Learning

Links

You can find the slides here.

The posts presenting a slightly more in-depth version of the material are on my blog. Part 1, Part 2, Part 3.

Our ICML '18 workshop paper: Scalable Natural Gradient Langevin Dynamics

You can follow me on twitter.

Code

The code in this repo is presented as a small package, sgld. A demonstration of its usage and graphs generated for the presentation are in this notebook.

Thank you!

sgld's People

Contributors

henripal 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

Watchers

 avatar  avatar  avatar  avatar  avatar

sgld's Issues

Question about SGLD optimizer

Hi! It was impressive to see your code, especially using parent class (Optimizer) to make SGLD class in sgld_optimizer.py .

However I'm wondering if adding noise with gradient is a little bit wrong. According to the SGLD paper (and also in your ICML Workshop paper), it seems that

langevin_noise = Normal(torch.zeros(size), torch.ones(size) / group['lr'])
p.data.add_(-group['lr'], d_p + langevin_noise.sample().cuda())

based on the fact that lr * (Sample from N(0,1/lr)) is equal to Sample fron N(0,lr)

Question: What does it mean to use optimizer with addnoise=False and where is KSGLD implementation?

First of all, thanks for the paper and the source code! Both had influenced the direction of the research topic for my master degree (still in early phase).

KSGLD is mentioned in the paper but I couldn't find the code for KSGLD optimizer anywhere. Did it implemented in some other repository or did I miss something?

Another question (or more of a request for clarification), what does it mean to use SGLD/pSGLD with parameter addnoise=False? I guess:

  • SGLD optimizer with addnoise=False is equivalent to running classic SGD optimizer. I tried to verify this by using this SGLD without noise, and compare the result to using PyTorch's SGD optimizer. And the accuracy in each epoch for both optimizer came out almost identical. So I'm almost sure this interpretation is correct, just want to confirm.
  • pSGLD optimizer with addnoise=False is equivalent to running classic SGD with RMSProp, or just RMSProp for short, is this correct? (I haven't tried to compare pSGLD without noise to PyTorch's RMSProp optimizer). I have just tried training the model in this repo using PyTorch's RMSprop and the accuracy in each epoch also identical to using pSGLD without noise.

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.