Skip to content

Example of an autoencoder set up for spectrograms, using Theano and Lasagne

License

Notifications You must be signed in to change notification settings

luster/autoencoder-specgram

 
 

Repository files navigation

Spectrogram auto-encoder (c) Dan Stowell 2016.

A simple example of an autoencoder set up for spectrograms, with two convolutional layers - thought of as one "encoding" layer and one "decoding" layer.

It's meant to be a fairly minimal example of doing this in Theano, using the Lasagne framework to make things easier.

By default it simply makes a training set from different chunks of the same single spectrogram (from the supplied wave file). This is not a good training set!

Notable (potentially unusual) things about this implementation:

  • Data is not pre-whitened, instead we use a custom layer (NormalisationLayer) to normalise the mean-and-variance of the data for us. This is because I want the spectrogram to be normalised when it is input but not normalised when it is output.
  • It's a convolutional net but only along the time axis; along the frequency axis it's fully-connected.
  • There's no maxpooling/downsampling.

SYSTEM REQUIREMENTS

Tested on Ubuntu 14.04 with Python 2.7.

USAGE

      python autoencoder-specgram.py

It creates a "pdf" folder and puts plots in there (multi-page PDFs) as it goes along. There's a "progress" pdf which gets repeatedly overwritten - you should see the output quality gradually getting better.

Look in userconfig.py for configuration options.

About

Example of an autoencoder set up for spectrograms, using Theano and Lasagne

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%