Skip to content
Switch branches/tags
Go to file


Failed to load latest commit information.

Deep Complex Networks

This repository contains code which reproduces experiments presented in the paper Deep Complex Networks.


Install requirements for computer vision experiments with pip:

pip install numpy Theano keras kerosene

And for music experiments:

pip install scipy sklearn intervaltree resampy
pip install git+git://

Depending on your Python installation you might want to use anaconda or other tools.


pip install .


Computer vision

  1. Get help:

    python scripts/ train --help
  2. Run models:

    python scripts/ train -w WORKDIR --model {real,complex} --sf STARTFILTER --nb NUMBEROFBLOCKSPERSTAGE

    Other arguments may be added as well; Refer to train --help for

    • Optimizer settings
    • Dropout rate
    • Clipping
    • ...


  1. Download the dataset from the official page

    mkdir data/
    wget -P data/
  2. Resample the dataset with data/musicnet.npz data/musicnet_11khz.npz 44100 11000
  3. Run shallow models shallow_model --in-memory --model=shallow_convnet --local-data data/musicnet_11khz.npz shallow_complex_model --in-memory --model=complex_shallow_convnet --complex --local-data data/musicnet_11khz.npz
  4. Run deep models deep_model --in-memory --model=deep_convnet --fourier --local-data data/musicnet_11khz.npz deep_complex_model --in-memory --model=complex_deep_convnet --fourier --complex --local-data data/musicnet_11khz.npz
  5. Visualize with jupyter notebook

    Run the notebook notebooks/visualize_musicnet.ipynb.

    precision-recall predicitons


Please cite our work as

    author  = "Chiheb Trabelsi, Olexa Bilaniuk, Ying Zhang, Dmitriy Serdyuk, Sandeep Subramanian, João Felipe Santos, Soroush Mehri, Negar Rostamzadeh, Yoshua Bengio, Christopher J Pal",
    title   = "Deep Complex Networks",
    journal = "arXiv preprint arXiv:1705.09792",
    year    = "2017"