All Projects → alshedivat → Keras Gp

alshedivat / Keras Gp

Licence: mit
Keras + Gaussian Processes: Learning scalable deep and recurrent kernels.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Keras Gp

Keras Vis
Neural network visualization toolkit for keras
Stars: ✭ 2,900 (+1230.28%)
Mutual labels:  neural-networks, theano
Keras Rl
Deep Reinforcement Learning for Keras.
Stars: ✭ 5,166 (+2269.72%)
Mutual labels:  neural-networks, theano
Deepjazz
Deep learning driven jazz generation using Keras & Theano!
Stars: ✭ 2,766 (+1168.81%)
Mutual labels:  neural-networks, theano
Yann
This toolbox is support material for the book on CNN (http://www.convolution.network).
Stars: ✭ 41 (-81.19%)
Mutual labels:  neural-networks, theano
Numpy Ml
Machine learning, in numpy
Stars: ✭ 11,100 (+4991.74%)
Mutual labels:  neural-networks, gaussian-processes
Hyperdensenet
This repository contains the code of HyperDenseNet, a hyper-densely connected CNN to segment medical images in multi-modal image scenarios.
Stars: ✭ 124 (-43.12%)
Mutual labels:  neural-networks, theano
Lasagne
Lightweight library to build and train neural networks in Theano
Stars: ✭ 3,800 (+1643.12%)
Mutual labels:  neural-networks, theano
Deep Kernel Gp
Deep Kernel Learning. Gaussian Process Regression where the input is a neural network mapping of x that maximizes the marginal likelihood
Stars: ✭ 58 (-73.39%)
Mutual labels:  neural-networks, gaussian-processes
Neural Tangents
Fast and Easy Infinite Neural Networks in Python
Stars: ✭ 1,357 (+522.48%)
Mutual labels:  neural-networks, gaussian-processes
Keras Contrib
Keras community contributions
Stars: ✭ 1,532 (+602.75%)
Mutual labels:  neural-networks, theano
Livianet
This repository contains the code of LiviaNET, a 3D fully convolutional neural network that was employed in our work: "3D fully convolutional networks for subcortical segmentation in MRI: A large-scale study"
Stars: ✭ 143 (-34.4%)
Mutual labels:  neural-networks, theano
Bayesiandeeplearning Survey
Bayesian Deep Learning: A Survey
Stars: ✭ 214 (-1.83%)
Mutual labels:  neural-networks
Unsupervisedscalablerepresentationlearningtimeseries
Unsupervised Scalable Representation Learning for Multivariate Time Series: Experiments
Stars: ✭ 205 (-5.96%)
Mutual labels:  neural-networks
Pine
🌲 Aimbot powered by real-time object detection with neural networks, GPU accelerated with Nvidia. Optimized for use with CS:GO.
Stars: ✭ 202 (-7.34%)
Mutual labels:  neural-networks
Biggan Pytorch
The author's officially unofficial PyTorch BigGAN implementation.
Stars: ✭ 2,459 (+1027.98%)
Mutual labels:  neural-networks
Rigl
End-to-end training of sparse deep neural networks with little-to-no performance loss.
Stars: ✭ 216 (-0.92%)
Mutual labels:  neural-networks
Cnn Text Classification Keras
Text Classification by Convolutional Neural Network in Keras
Stars: ✭ 213 (-2.29%)
Mutual labels:  theano
Radio
RadIO is a library for data science research of computed tomography imaging
Stars: ✭ 198 (-9.17%)
Mutual labels:  neural-networks
Cornell Moe
A Python library for the state-of-the-art Bayesian optimization algorithms, with the core implemented in C++.
Stars: ✭ 198 (-9.17%)
Mutual labels:  gaussian-processes
Sca Cnn.cvpr17
Image Captions Generation with Spatial and Channel-wise Attention
Stars: ✭ 198 (-9.17%)
Mutual labels:  theano

Gaussian Processes for Keras

Build Status Coverage Status license

KGP extends Keras with Gaussian Process (GP) layers. It allows one to build flexible GP models with kernels structured with deep and recurrent networks built with Keras. The structured part of the model (the neural net) runs on Theano or Tensorflow. The GP layers use a custom backend based on GPML 4.0 library, and builds on KISS-GP and extensions. The models can be trained in stages or jointly, using full-batch or semi-stochastic optimization approaches (see our paper). For additional resources and tutorials on Deep Kernel Learning and KISS-GP see https://people.orie.cornell.edu/andrew/code/

KGP is compatible with: Python 2.7-3.5.

In particular, this package implements the method described in our paper:
Learning Scalable Deep Kernels with Recurrent Structure
Maruan Al-Shedivat, Andrew Gordon Wilson, Yunus Saatchi, Zhiting Hu, Eric P. Xing
Journal of Machine Learning Research, 2017.

Getting started

KGP allows to build models in the same fashion as Keras, using the functional API. For example, a simple GP-RNN model can be built and compiled in just a few lines of code:

from keras.layers import Input, SimpleRNN
from keras.optimizers import Adam

from kgp.layers import GP
from kgp.models import Model
from kgp.losses import gen_gp_loss

input_shape = (10, 2)  # 10 time steps, 2 dimensions
batch_size = 32
nb_train_samples = 512
gp_hypers = {'lik': -2.0, 'cov': [[-0.7], [0.0]]}

# Build the model
inputs = Input(shape=input_shape)
rnn = SimpleRNN(32)(inputs)
gp = GP(gp_hypers,
        batch_size=batch_size,
        nb_train_samples=nb_train_samples)
outputs = [gp(rnn)]
model = Model(inputs=inputs, outputs=outputs)

# Compile the model
loss = [gen_gp_loss(gp) for gp in model.output_layers]
model.compile(optimizer=Adam(1e-2), loss=loss)

Note that KGP models support arbitrary off-the-shelf optimizers from Keras.

Further resources:

Installation

KGP depends on Keras and requires either Theano or TensorFlow being installed. The GPML backend requires either MATLAB or Octave and a corresponding Python interface package: Oct2Py for Octave or the MATLAB engine for Python. Generally, MATLAB backend seems to provide faster runtime. However, if you compile the latest version of Octave with JIT and OpenBLAS support, the overhead gets reduced to minimum.

If you are using Octave, you will need the statistics package. You can install the package using Octave-Forge:

$ octave --eval "pkg install -forge -verbose io"
$ octave --eval "pkg install -forge -verbose statistics"

The requirements can be installed via pip as follows (use sudo if necessary):

$ pip install -r requirements.txt

To install the package, clone the repository and run setup.py as follows:

$ git clone --recursive https://github.com/alshedivat/kgp
$ cd kgp
$ python setup.py develop [--user]

The --user flag (optional) will install the package for a given user only.

Note: Recursive clone is required to get GPML library as a submodule. If you already have a copy of GPML, you can set GPML_PATH environment variable to point to your GPML folder instead.

Contribution

Contributions and especially bug reports are more than welcome.

Citation

@article{alshedivat2017srk,
  title={Learning scalable deep kernels with recurrent structure},
  author={Al-Shedivat, Maruan and Wilson, Andrew Gordon and Saatchi, Yunus and Hu, Zhiting and Xing, Eric P},
  journal={Journal of Machine Learning Research},
  volume={18},
  number={1},
  year={2017},
}

License

For questions about the code and licensing details, please contact Maruan Al-Shedivat and Andrew Gordon Wilson.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].