Skip to content

Instantly share code, notes, and snippets.

@jiumem
jiumem / data.py
Created December 10, 2015 12:40 — forked from rezoo/data.py
Simple implementation of Generative Adversarial Nets using chainer
import gzip
import os
import numpy as np
import six
from six.moves.urllib import request
parent = 'http://yann.lecun.com/exdb/mnist'
train_images = 'train-images-idx3-ubyte.gz'
train_labels = 'train-labels-idx1-ubyte.gz'
@jiumem
jiumem / simple_gan.py
Created December 10, 2015 11:39 — forked from Newmu/simple_gan.py
Simple Generative Adversarial Network Demo
import os
import numpy as np
from matplotlib import pyplot as plt
from time import time
from foxhound import activations
from foxhound import updates
from foxhound import inits
from foxhound.theano_utils import floatX, sharedX
@jiumem
jiumem / distcorr.py
Created December 1, 2015 04:20 — forked from satra/distcorr.py
Distance Correlation in Python
from scipy.spatial.distance import pdist, squareform
import numpy as np
from numbapro import jit, float32
def distcorr(X, Y):
""" Compute the distance correlation function
>>> a = [1,2,3,4,5]
>>> b = np.array([1,2,9,4,4])