deep-learning contains code to train and evaluate deep neural networks on data from the CMS Experiment at CERN's LHC. It also contains some scripts to graph the performance of networks.
- Get the stuff we wrote
git clone https://github.com/klannon/deep-learning.git deep_learning
- It is VERY IMPORTANT that you clone the repository into the folder "deep_learning" (which will happen by default) instead of some other directory of your choosing. The imports depend on the top-level module being "deep_learning."
- Create your virtual environment
To keep this repository's dependencies separate from the rest of the python packages you have installed on your system, we recommend setting up a virtual envirtonment to contain the software you install in step 3.
- Install virtualenv
- Because some of the software in step 3 depends on
scipy
andnumpy
, each of which is tightly coupled with your system BLAS libraries, set up your virtual environment like this:virtualenv --system-site-packages env
so virtualenv will know about your system installations of numpy and scipy. - Since your virtual environment wouldn't be very useful if you didn't activate it,
source env/bin/activate
if you use BASH orsource env/bin/activate.csh
if you use CSH
</li> <li>Get the stuff we <em>didn't</em> write <ul> <li><a href="http://keras.io/">Keras</a>: <code>pip install keras</code> Deep learning library used for designing/executing experiments</li> <li><a href="https://developers.google.com/protocol-buffers/">Google Protocol Buffers</a>: <code>pip install protobuf==3.0.0b2</code> Data serialization library used to save the results of Keras experiments in an intelligible format</li> <li><a href="http://www.pytables.org/downloads.html">PyTables</a>: <code>pip install tables</code> Library we use to store and access arrays of data very efficiently, even if it exceeds your RAM</li> </ul> Note: If you want to visualize the results of the networks you train, you should use <a href="https://github.com/mdkdrnevich/deep_viz">Deep Viz</a> </li> <li>Set the <code>PYTHONPATH</code> environment variable to the <em>PARENT</em> directory of the directory that you cloned this repository into (whatever directory containes the folder "deep_learning" by default) so python can resolve our imports correctly. <ul> <li>CSH: <code>setenv PYTHONPATH /path/to/parent/directory</code></li> <li>BASH: <code>export PYTHONPATH="/path/to/parent/directory"</code></li> </ul> </li>
If you're planning on using this code frequently, consider adding the PYTHONPATH environment variable to your .cshrc, .bashrc, .bash_profile, or .profile (depending on your shell of choice) so you don't have to keep setting it