Giter VIP home page Giter VIP logo

sgld's Introduction

Stochastic Gradient Langevin Dynamics for Bayesian learning

This was a final project for Berkeley's EE126 class in Spring 2019: Final Project Writeup

This respository contains code to reproduce and analyze the results of the paper "Bayesian Learning via Stochastic Gradient Langevin Dynamics". We evaluated the performance of SGLD as an ensembling technique, performed visualizations of the class activations for the model samples from the posterior, and estimated the model uncertainty by measuring the Shannon entropy of the model predictions in different setups.

Running SGLD

This repository uses the skeletor framework for experiment orchestration and metric analysis.

To train the models for all noise scale configurations, use: python -m sgld.train --config config.yaml sgld

To run an experiment, use: python -m sgld.analysis --mode <experiment> <experimentargs> analysis

The code to reproduce the plots from the writeup can be found in notebooks/.

Here is a cool visualization:

tsne

Each dot is a two-dimensional projection of the pre-activations for the final linear layer of the network. We project all the points from a single class using this technique, and repeat it for each model in the ensemble. Lighter color (from purple to yellow) indicates a model obtained later in training. The diamonds represent the class centroids for each model.

Acknowledgements

The PyTorch t-SNE code is a modification of Chris Moody's implementation here.

sgld's People

Contributors

har07 avatar noahgolmant avatar

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.