Giter Site home page Giter Site logo

deepcgp's Introduction

Deep convolutional gaussian processes

Deep convolutional gaussian process

This repository implements deep convolutional gaussian processes, a deep gaussian process model for hierarchically detecting combinations of local features in images.

We've written about the method in our paper titled Deep Convolutional Gaussian Processes.

We propose deep convolutional Gaussian processes, a deep Gaussian process architecture with convolutional structure. The model is a principled Bayesian framework for detecting hierarchical combinations of local features for image classification. We demonstrate greatly improved image classification performance compared to current Gaussian process approaches on the MNIST and CIFAR-10 datasets. In particular, we improve CIFAR-10 accuracy by over 10 percentage points.

-- Kenneth Blomqvist, Samuel Kaski, Markus Heinonen

The figures in the paper have been generated using this notebook.

Setup

This package uses the doubly stochastic deep gaussian process package. It has been included as a submodule to this repository. To install it run sh ./init.sh. This will initialize submodule and install the doubly stochastic deep gp package.

To install other dependencies run pip install -r requirements.txt.

Running experiments

To run the mnist experiment run python conv_gp/mnist.py. Parameters and a number of options can be set using command line arguments. To see a full list of options run python conv_gp/mnist.py --help.

The CIFAR-10 experiment located at conv_gp/cifar.py works similarly.

deepcgp's People

Contributors

kekeblom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deepcgp's Issues

AttributeError: 'Namespace' object has no attribute 'load_model'

In experiment.py, _setup_model method throws the attribute error:

def _setup_model(self):

model_builder = ModelBuilder(self.flags, self.X_train, self.Y_train, model_path=self._model_path(self.flags.load_model))

self.model = model_builder.build()

The flag variable load model was not defined in the cifar.py, read_args() method.

How should I declare load_model variable?

mistake in _cluster_patches

Hi, while looking at the code I have found that in _cluster_patches in kernels.py, the array 'patches' is allocated too small -- (M x patch_length) instead of (M*samples_per_inducing_point x patch_length) -- and then the following loop preserves only the first M samples instead of all of them (the indexing is done in such a way that unfortunately no index out of bound error is emitted). This leads to a commonly displayed error that not enough cluster centers were found. Obviously, also the clusters are not initialized correctly and who knows what is the consequence for the training...

Anyway, a great paper and a piece of code! Thanks a lot for sharing it!

What does feature_maps parameter mean and how can I change it to more layers than 1 besides last layer

Hi, I read the paper and your code, I think is an excellent and helpful work for me! I have a small question here. In the parameter settings there is a parameter named feature_maps and in model.py, there is an assertion:
assert len(feature_maps) == (len(Ms) - 1)
the default feature_maps is 10, is this the height and weight of conv_gp layer?
Because there is only 1 feature_maps in setting, so is there one layer in conv_gp? and how to transfer it more than 1 layer?

DeepCGP is not working!

I tried two simple steps.

Step #1: python conv_gp/mnist.py -> ModuleNotFoundError:
Step #2: The read_args method have missing arguments such as M, N, test_size variables.

Could you please upload a working version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.