Skip to content

Instantly share code, notes, and snippets.

View rocknrollnerd's full-sized avatar

Artem Khurshudov rocknrollnerd

View GitHub Profile
@rocknrollnerd
rocknrollnerd / bayes_by_backprop.py
Created April 3, 2016 08:12
Theano implementation of Bayes-by-Backprop algorithm from "Weight uncertainty in neural networks" paper
import theano
import theano.tensor as T
from theano.tensor.shared_randomstreams import RandomStreams
from theano.sandbox.rng_mrg import MRG_RandomStreams
from lasagne.updates import adam
from lasagne.utils import collect_shared_vars
from sklearn.datasets import fetch_mldata
from sklearn.cross_validation import train_test_split
from sklearn import preprocessing
@rocknrollnerd
rocknrollnerd / adversarial_1d.py
Created January 18, 2016 16:50
A simple adversarial network in Theano+Lasagne trying to estimate a 1d normal distribution
import matplotlib.pyplot as plt
import numpy as np
import lasagne
import theano
import theano.tensor as T
from lasagne.nonlinearities import rectify, sigmoid, linear, tanh
from scipy.stats import norm
import seaborn as sns
# with the huge help of http://evjang.com/articles/genadv1