CADL
ARCHIVED: Contains historical course materials/Homework materials for the FREE MOOC course on "Creative Applications of Deep Learning w/ Tensorflow" #CADL
Install / Use
/learn @pkmital/CADLREADME
<a href="https://www.kadenze.com/courses/creative-applications-of-deep-learning-with-tensorflow/info">Creative Applications of Deep Learning w/ Tensorflow</a>
This repository contains lecture transcripts and homework assignments as Jupyter Notebooks for the first of three <a href="https://www.kadenze.com/partners/kadenze-academy">Kadenze Academy</a> courses on <a href="https://www.kadenze.com/courses/creative-applications-of-deep-learning-with-tensorflow/info">Creative Applications of Deep Learning w/ Tensorflow</a>. It also contains a python package containing all the code developed during all three courses.
COURSE 1: Creative Applications of Deep Learning with TensorFlow I
Session 1: Introduction to TensorFlow
Session 2: Training A Network W/ TensorFlow
Session 3: Unsupervised And Supervised Learning
Session 4: Visualizing And Hallucinating Representations
Session 5: Generative Models
COURSE 2: Creative Applications of Deep Learning with TensorFlow II
Session 1: Cloud Computing, GPUs, Deploying
Session 2: Mixture Density Networks
Session 3: Modeling Attention with RNNs, DRAW
Session 4: Image-to-Image Translation with GANs
COURSE 3: Creative Applications of Deep Learning with TensorFlow III
Session 1: Modeling Music and Art: Google Brain’s Magenta Lab
Session 2: Modeling Language: Natural Language Processing
Session 3: Autoregressive Image Modeling w/ PixelCNN
Session 4: Modeling Audio w/ Wavenet and NSynth
Github Contents Overview
| | Session | Description | Transcript | Homework | | --- | --- | --- | --- | --- | | Python Package | pycadl | Python package required for courses 2 and 3 | N/A | N/A | |Installation| Installation | Setting up Python/Notebook and necessary libraries. | N/A | N/A | |Preliminaries| Preliminaries with Python | Basics of working with Python and images. | N/A | N/A | |1| Computing with Tensorflow | Working with a small dataset of images. Dataset preprocessing. Tensorflow basics. Sorting/organizing a dataset. | lecture-1.ipynb Colab | session-1.ipynb | |2| Basics of Neural Networks | Learn how to create a Neural Network. Learn to use a neural network to paint an image. Apply creative thinking to the inputs, outputs, and definition of a network. | lecture-2.ipynb | session-2.ipynb | |3| Unsupervised and Supervised Learning | Build an autoencoder. Extend it with convolution, denoising, and variational layers. Build a deep classification network. Apply softmax and onehot encodings to classify audio using a Deep Convolutional Network. | lecture-3.ipynb | session-3.ipynb | |4| Visualizing Representations | Visualize backpropped gradients, use them to create Deep Dream, extend Deep Dream w/ regularization. Stylize images or synthesize new images with painterly or hallucinated aesthetics of another image. | lecture-4.ipynb | session-4.ipynb | |5| Generative Models | Build a Generative Adversarial Network and extend it with a Variational Autoencoder. Use the latent space of this network to perform latent arithmetic. Build a character level Recurrent Neural Network using LSTMs. Understand different ways of inferring with Recurrent Networks. | lecture-5.ipynb | session-5-part-1.ipynb, session-5-part-2.ipynb |
<a name="installation-preliminaries"></a>
Installation Preliminaries
<!-- MarkdownTOC autolink=true autoanchor=true bracket=round -->- Quickstart Guide
- What is Notebook?
- Docker Toolbox
- Jupyter Notebook
- Navigating to Notebook
- Installing Python Packages
- CUDA/GPU instructions
- Testing it
- CUDA/GPU instructions for MacOS
- Troubleshooting
- ImportError: No module named 'tensorflow'
- AttributeError: module 'tensorflow' has no attribute '__version__'
- GPU-related issues
- Protobuf library related issues
- Cannot import name 'descriptor'
- Can't find setup.py
- SSLError: SSL_VERIFY_FAILED
- Jupyter Notebook Kernel is always busy (Windows)
- Something Else!
The first course makes heavy usage of Jupyter Notebook. This will be necessary for submitting the homeworks and interacting with the guided session notebooks I will provide for each assignment. Follow along this guide and we'll see how to obtain all of the necessary libraries that we'll be using. By the end of this, you'll have installed Jupyter Notebook, NumPy, SciPy, and Matplotlib. While many of these libraries aren't necessary for performing the Deep Learning which we'll get to in later lectures, they are incredibly useful for manipulating data on your computer, preparing data for learning, and exploring results.
<a name="quickstart-guide"></a>
Quickstart Guide
Please skip this section and read the rest of this readme if you are unfamiliar w/ Jupyter Notebook or installing Python libraries. This section is only for advanced users who want to get started quickly.
There are two ways to get started. You can use a native pip installation or use Docker. There is a quickstart guide for both methods below. If you have trouble with these, then please skip to the more in depth guides below these sections.
<a name="method-1-pip-install"></a>
Method 1: pip Install
For those of you that are proficient w/ Python programming, you'll need Python 3.4+ and the latest TensorFlow which you can install via pip, e.g.:
$ pip install tensorflow
or w/ CUDA as:
$ pip install tensorflow-gpu
<a name="method-2-docker-installation"></a>
Method 2: Docker Installation
If you want a controlled environment w/ all dependencies installed for you, and are proficient w/ Docker and Jupyter, you can get started w/ this repo like so:
$ cd
$ git clone --recursive https://github.com/pkmital/CADL.git
$ cd CADL
$ docker build -t cadl .
$ docker run -it -p 8888:8888 -p 6006:6006 -v /$(pwd)/session-1:/notebooks --name tf cadl /bin/bash
Note that you can skip the build step and download from docker hub instead like so:
$ docker run -it -p 8888:8888 -p 6006:6006 -v /$(pwd)/session-1:/notebooks --name tf pkmital/cadl /bin/bash
Be sure to replace "session-1" with whichever session you are working on, e.g. "session-2", "session-3"... This will give you a bash prompt with the files for each session:
root@39c4441bcde8:/notebooks# ls
README.md lecture-1.ipynb libs session-1.ipynb tests
Which you can use to launch jupyter like so:
root@39c4441bcde8:/notebooks# jupyter notebook --allow-root
[I 01:45:27.712 NotebookApp] [nb_conda_kernels] enabled, 2 kernels found
[I 01:45:27.715 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
[W 01:45:27.729 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 01:45:27.799 NotebookApp] [nb_anacondacloud] enabled
[I 01:45:27.802 NotebookApp] [nb_conda] enabled
[I 01:45:27.856 NotebookApp] ✓ nbpresent HTML export ENABLED
[W 01:45:27.856 NotebookApp] ✗ nbpresent PDF export DISABLED: No module named 'nbbrowserpdf'
[I 01:45:27.858 NotebookApp] Serving notebooks from local directory: /notebooks
[I 01:45:27.858 NotebookApp] 0 active kernels
[I 01:45:27.858 NotebookApp] The Jupyter Notebook is running at: http://[all ip addresses on your system]:8888/?token=dd68eeffd8f227dd789327c981d16b24631866e909bd6469
[I 01:45:27.858 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Jupyter should then be running if you navigate Google Chrome (suggested!) to "http://localhost:8888". If you navigate to the session-1.ipynb file, you will see the homework, or to "lecture-1.ipynb", to find the lecture transcripts. The same goes for every other session.
If you need to relaunch the docker image again, you can write:
$ cd
$ cd CADL
$ docker start -i tf
If you want to use a GPU version, and have a Linux machine, and have an NVIDIA GPU, you can use nvidia-docker (this only works for Linux machines! for non-Linux machines that want to use GPU, please fo
