Skip to content

Instantly share code, notes, and snippets.

View xiangze's full-sized avatar

xiangze xiangze

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy
import theano
import theano.tensor as T
rng = numpy.random
N = 20
dt= theano.shared(0.1, name="dt")
x = theano.shared(rng.randn(N), name="x")
y = theano.shared(rng.randn(N), name="y")
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 20 03:23:01 2015
@author: xiangze
"""
import theano
import theano.tensor as T
import numpy as np
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@xiangze
xiangze / emcee_sample.ipynb
Last active October 21, 2016 08:19
a trial script of emcee(python MCMC library)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@xiangze
xiangze / HMC_repmon.py
Last active August 29, 2015 14:22
Parallel tempering with theano
# -*- coding: utf-8 -*-
import numpy
from theano import function, shared
from theano import tensor as T
import theano
import numpy as np
from scipy import linalg
sharedX = lambda X, name: shared(numpy.asarray(X, dtype=theano.config.floatX), name=name)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.