{"_id":"552ca79468b9a02100718488","createdAt":"2015-03-14T07:58:17.255Z","link_external":false,"user":"5503e897e508a017002013bd","order":0,"sync_unique":"","title":"Installation/Getting Started","body":"[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/8onY7AslTTClLfniCey7_automate!.jpg\",\n        \"automate!.jpg\",\n        \"400\",\n        \"300\",\n        \"#db146b\",\n        \"\"\n      ],\n      \"caption\": \"\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"What is OpenDeep?\"\n}\n[/block]\n[OpenDeep](http://www.opendeep.org) is a general purpose commercial and research grade [deep learning](http://markus.com/deep-learning-101) library for Python built from the ground up in [Theano](http://deeplearning.net/software/theano/index.html) that brings unprecedented flexibility for both industry data scientists and cutting-edge researchers.\n\nYou can train and use existing deep learning models as a black box implementation, combine multiple models create your own novel research, or write new models from scratch without worrying about the overhead!\n\nOpenDeep is for you if you want:\n* To **not reinvent the wheel** - instead you can pick and choose to use base implementations of datasets, optimization (training) algorithms, and popular models.\n* **Flexibility and extensibility** to create novel models and optimization methods without having to think too hard about the framework - no one wants that cognitive load!\n* **Speed and stability** of the Theano framework with effortless GPU integration for orders of magnitude speed improvements.\n* Dependability for having implementations of popular and **state-of-the-art** algorithms.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Quick example usage: code an MLP in ~20 seconds\"\n}\n[/block]\nA [Multilayer Perceptron](http://deeplearning.net/tutorial/mlp.html) is a simple feedforward network that has a classification layer. In this example, we can quickly construct a model container, add some hidden layers and an output layer, and train the network to classify images of handwritten digits (MNIST dataset).\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"from opendeep.models.container import Prototype\\nfrom opendeep.models.single_layer.basic import BasicLayer, SoftmaxLayer\\nfrom opendeep.optimization.adadelta import AdaDelta\\nfrom opendeep.data.standard_datasets.image.mnist import MNIST\\n\\nmlp = Prototype()\\nmlp.add(BasicLayer(input_size=28*28, output_size=512, activation='rectifier', noise='dropout'))\\nmlp.add(BasicLayer(output_size=512, activation='rectifier', noise='dropout'))\\nmlp.add(SoftmaxLayer(output_size=10))\\n\\ntrainer = AdaDelta(model=mlp, dataset=MNIST())\\ntrainer.train()\",\n      \"language\": \"python\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Installation\"\n}\n[/block]\n#Dependencies\n\n* **[Theano](http://deeplearning.net/software/theano/index.html)**: Theano and its dependencies are required to use OpenDeep. You need to install the bleeding-edge version, which has [installation instructions here](http://deeplearning.net/software/theano/install.html#bleeding-edge-install-instructions). \n\n  * For GPU integration with Theano, you also need the latest **[CUDA drivers](https://developer.nvidia.com/cuda-toolkit)**. Here are [instructions for setting up Theano for the GPU](http://deeplearning.net/software/theano/tutorial/using_gpu.html). If you prefer to use a server on Amazon Web Services, here are instructions for setting up an [EC2 server with Theano](http://markus.com/install-theano-on-aws).\n\n  * **[CuDNN](https://developer.nvidia.com/cuDNN)** (optional): for a fast convolutional net support from Nvidia. You will want to move the files to Theano's directory like the instructions say here: [Theano cuDNN integration](http://deeplearning.net/software/theano/library/sandbox/cuda/dnn.html).\n\n* **[Pillow (PIL)](https://pillow.readthedocs.org/installation.html)**: image manipulation functionality.\n\n* **[PyYAML](http://pyyaml.org/)** (optional): used for YAML parsing of config files.\n\n* **[Bokeh](http://bokeh.pydata.org/en/latest/)** (optional): if you want live charting/plotting of values during training or testing. Make sure you can use the bokeh-server command.\n\n\n\n#Install from source\nBecause OpenDeep is still in alpha, you have to install via setup.py. Here are the steps to install:\n\n1) Navigate to your desired installation directory and download the github repository like so:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"git clone https://github.com/vitruvianscience/opendeep.git\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n2) Navigate to the top-level folder (should be named OpenDeep and contain the file setup.py) and run setup.py with develop mode like so:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"cd OpenDeep\\npython setup.py develop\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nUsing `python setup.py develop` instead of the normal `python setup.py install` allows you to update the repository files by pulling from git and have the whole package update! No need to reinstall.\n\nThat's it! Now you should be able to import opendeep into python modules.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Next Steps\"\n}\n[/block]\nCheck out some Tutorials in the navigation bar on the left. \n\nTo learn how to use existing models, check out [Tutorial: First Steps](doc:tutorial-first-steps).\n\nA good place to start writing models is [Tutorial: Your First Model (DAE)](doc:tutorial-your-first-model), where you will learn how to create a new model from scratch.","category":"552ca79368b9a02100718486","excerpt":"This page will help you get started with OpenDeep. You'll be up and running in a jiffy!","githubsync":"","hidden":false,"updates":[],"__v":9,"link_url":"","type":"basic","version":"552ca79368b9a02100718485","api":{"auth":"required","params":[],"results":{"codes":[]},"url":""},"project":"5503ea178c5e913700362c70","slug":"getting-started","childrenPages":[]}

Installation/Getting Started

This page will help you get started with OpenDeep. You'll be up and running in a jiffy!

[block:image] { "images": [ { "image": [ "https://files.readme.io/8onY7AslTTClLfniCey7_automate!.jpg", "automate!.jpg", "400", "300", "#db146b", "" ], "caption": "" } ] } [/block] [block:api-header] { "type": "basic", "title": "What is OpenDeep?" } [/block] [OpenDeep](http://www.opendeep.org) is a general purpose commercial and research grade [deep learning](http://markus.com/deep-learning-101) library for Python built from the ground up in [Theano](http://deeplearning.net/software/theano/index.html) that brings unprecedented flexibility for both industry data scientists and cutting-edge researchers. You can train and use existing deep learning models as a black box implementation, combine multiple models create your own novel research, or write new models from scratch without worrying about the overhead! OpenDeep is for you if you want: * To **not reinvent the wheel** - instead you can pick and choose to use base implementations of datasets, optimization (training) algorithms, and popular models. * **Flexibility and extensibility** to create novel models and optimization methods without having to think too hard about the framework - no one wants that cognitive load! * **Speed and stability** of the Theano framework with effortless GPU integration for orders of magnitude speed improvements. * Dependability for having implementations of popular and **state-of-the-art** algorithms. [block:api-header] { "type": "basic", "title": "Quick example usage: code an MLP in ~20 seconds" } [/block] A [Multilayer Perceptron](http://deeplearning.net/tutorial/mlp.html) is a simple feedforward network that has a classification layer. In this example, we can quickly construct a model container, add some hidden layers and an output layer, and train the network to classify images of handwritten digits (MNIST dataset). [block:code] { "codes": [ { "code": "from opendeep.models.container import Prototype\nfrom opendeep.models.single_layer.basic import BasicLayer, SoftmaxLayer\nfrom opendeep.optimization.adadelta import AdaDelta\nfrom opendeep.data.standard_datasets.image.mnist import MNIST\n\nmlp = Prototype()\nmlp.add(BasicLayer(input_size=28*28, output_size=512, activation='rectifier', noise='dropout'))\nmlp.add(BasicLayer(output_size=512, activation='rectifier', noise='dropout'))\nmlp.add(SoftmaxLayer(output_size=10))\n\ntrainer = AdaDelta(model=mlp, dataset=MNIST())\ntrainer.train()", "language": "python" } ] } [/block] [block:api-header] { "type": "basic", "title": "Installation" } [/block] #Dependencies * **[Theano](http://deeplearning.net/software/theano/index.html)**: Theano and its dependencies are required to use OpenDeep. You need to install the bleeding-edge version, which has [installation instructions here](http://deeplearning.net/software/theano/install.html#bleeding-edge-install-instructions). * For GPU integration with Theano, you also need the latest **[CUDA drivers](https://developer.nvidia.com/cuda-toolkit)**. Here are [instructions for setting up Theano for the GPU](http://deeplearning.net/software/theano/tutorial/using_gpu.html). If you prefer to use a server on Amazon Web Services, here are instructions for setting up an [EC2 server with Theano](http://markus.com/install-theano-on-aws). * **[CuDNN](https://developer.nvidia.com/cuDNN)** (optional): for a fast convolutional net support from Nvidia. You will want to move the files to Theano's directory like the instructions say here: [Theano cuDNN integration](http://deeplearning.net/software/theano/library/sandbox/cuda/dnn.html). * **[Pillow (PIL)](https://pillow.readthedocs.org/installation.html)**: image manipulation functionality. * **[PyYAML](http://pyyaml.org/)** (optional): used for YAML parsing of config files. * **[Bokeh](http://bokeh.pydata.org/en/latest/)** (optional): if you want live charting/plotting of values during training or testing. Make sure you can use the bokeh-server command. #Install from source Because OpenDeep is still in alpha, you have to install via setup.py. Here are the steps to install: 1) Navigate to your desired installation directory and download the github repository like so: [block:code] { "codes": [ { "code": "git clone https://github.com/vitruvianscience/opendeep.git", "language": "shell" } ] } [/block] 2) Navigate to the top-level folder (should be named OpenDeep and contain the file setup.py) and run setup.py with develop mode like so: [block:code] { "codes": [ { "code": "cd OpenDeep\npython setup.py develop", "language": "shell" } ] } [/block] Using `python setup.py develop` instead of the normal `python setup.py install` allows you to update the repository files by pulling from git and have the whole package update! No need to reinstall. That's it! Now you should be able to import opendeep into python modules. [block:api-header] { "type": "basic", "title": "Next Steps" } [/block] Check out some Tutorials in the navigation bar on the left. To learn how to use existing models, check out [Tutorial: First Steps](doc:tutorial-first-steps). A good place to start writing models is [Tutorial: Your First Model (DAE)](doc:tutorial-your-first-model), where you will learn how to create a new model from scratch.