This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from scipy.stats import exponweib | |
| from scipy.optimize import fmin | |
| import numpy as np | |
| # x is your data array | |
| # returns [shape, scale] | |
| def fitweibull(x): | |
| def optfun(theta): | |
| return -np.sum(np.log(exponweib.pdf(x, 1, theta[0], scale = theta[1], loc = 0))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| An implementation of the `Local reparameterization trick` | |
| from Kingma & Wellings and | |
| Bayesian RNN | |
| from Fortunato, Blundell & Vinyals | |
| """ | |
| import os | |
| import time | |
| import copy | |
| from os.path import join as pjoin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import print_function | |
| from keras.datasets import cifar10 | |
| from keras.layers import merge, Input | |
| from keras.layers.convolutional import Convolution2D, ZeroPadding2D, AveragePooling2D | |
| from keras.layers.core import Dense, Activation, Flatten, Dropout | |
| from keras.layers.normalization import BatchNormalization | |
| from keras.models import Model | |
| from keras.preprocessing.image import ImageDataGenerator | |
| from keras.utils import np_utils |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Alec Radford, Indico, Kyle Kastner | |
| # License: MIT | |
| """ | |
| Convolutional VAE in a single file. | |
| Bringing in code from IndicoDataSolutions and Alec Radford (NewMu) | |
| Additionally converted to use default conv2d interface instead of explicit cuDNN | |
| """ | |
| import theano | |
| import theano.tensor as T | |
| from theano.compat.python2x import OrderedDict |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| Reproducing the results of Auto-Encoding Variational Bayes by Kingma and Welling | |
| With a little help from the code from van Amersfoort and Otto Fabius (https://github.com/y0ast) | |
| @author: Pedro Tabacof (tabacof at gmail dot com) | |
| """ | |
| import random | |
| import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Joost van Amersfoort - <joost.van.amersfoort@gmail.com> | |
| Otto Fabius - <ottofabius@gmail.com | |
| License: MIT | |
| """ | |
| import numpy as np | |
| import theano as th | |
| import theano.tensor as T |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ Poisson-loss Factorization Machines with Numba | |
| Follows the vanilla FM model from: | |
| Steffen Rendle (2012): Factorization Machines with libFM. | |
| In: ACM Trans. Intell. Syst. Technol., 3(3), May. | |
| http://doi.acm.org/10.1145/2168752.2168771 | |
| See also: https://github.com/coreylynch/pyFM | |
| """ |
NewerOlder