diff --git a/07_01_notation_compose.ipynb b/07_01_notation_compose.ipynb index c271d05a22..7cc72d1516 100644 --- a/07_01_notation_compose.ipynb +++ b/07_01_notation_compose.ipynb @@ -7,7 +7,7 @@ "outputs": [], "source": [ "\n", - "from music21 import converter\n" + "from music21 import converter, chord, note\n" ] }, { diff --git a/Dockerfile.cpu b/Dockerfile.cpu index 4c26a14d21..775540fe2e 100644 --- a/Dockerfile.cpu +++ b/Dockerfile.cpu @@ -10,6 +10,10 @@ ARG groupid=1000 ARG userid=1000 ## end modify +RUN apt-get update && apt-get install -y \ + graphviz \ + libgraphviz-dev + COPY ./requirements.txt / RUN python3 -m pip install --upgrade pip RUN pip install -r /requirements.txt diff --git a/Dockerfile.gpu b/Dockerfile.gpu index 0609de4219..17e66fc2cc 100644 --- a/Dockerfile.gpu +++ b/Dockerfile.gpu @@ -10,6 +10,10 @@ ARG groupid=1000 ARG userid=1000 ## end modify +RUN apt-get update && apt-get install -y \ + graphviz \ + libgraphviz-dev + COPY ./requirements.txt / RUN python3 -m pip install --upgrade pip RUN pip install -r /requirements.txt diff --git a/README.md b/README.md index 6daad1fede..625a0ba739 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,15 @@ -# Generative Deep Learning -### Teaching Machines to paint, write, compose and play +# 🦜 Generative Deep Learning -The official code repository for examples in the O'Reilly book 'Generative Deep Learning' +## [NEW] 🚀 2nd edition codebase now live! -https://learning.oreilly.com/library/view/generative-deep-learning/9781492041931/ +⚠️ This repository is no longer maintained as the codebase for the 2nd edition of Generative Deep Learning is now live! -https://www.amazon.com/Generative-Deep-Learning-Teaching-Machines/dp/1492041947/ref=sr_1_1 +Please head over to https://github.com/davidADSP/Generative_Deep_Learning_2nd_Edition to check it out. -## Structure - -This repository is structured as follows: - -The notebooks for each chapter are in the root of the repository, prefixed with the chapter number. - -The `data` folder is where to download relevant data sources (chapter 3 onwards) -The `run` folder stores output from the generative models (chapter 3 onwards) -The `utils` folder stores useful functions that are sourced by the main notebooks - -## Book Contents -Part 1: Introduction to Generative Deep Learning -* Chapter 1: Generative Modeling -* Chapter 2: Deep Learning -* Chapter 3: Variational Autoencoders -* Chapter 4: Generative Adversarial Networks - -Part 2: Teaching Machines to Paint, Write, Compose and Play -* Chapter 5: Paint -* Chapter 6: Write -* Chapter 7: Compose -* Chapter 8: Play -* Chapter 9: The Future of Generative Modeling -* Chapter 10: Conclusion - - -## Getting started - -To get started, first install the required libraries inside a virtual environment: - -`pip install -r requirements.txt` - +## Branches +The `master` branch of this repo contains the Tensorflow 1.14 code that is present in the original book (first edition) +The `tensorflow_2` branch contains updated code that runs using Tensorflow 2. +However, I recommend swiching over to the repository for the 2nd edition (see above), as it contains many new examples and improvements to the overall structure. diff --git a/models/cycleGAN.py b/models/cycleGAN.py index 7c1cd6a6a3..29c48c21cd 100644 --- a/models/cycleGAN.py +++ b/models/cycleGAN.py @@ -1,7 +1,7 @@ from __future__ import print_function, division import scipy -from keras_contrib.layers.normalization import InstanceNormalization +from keras_contrib.layers.normalization.instancenormalization import InstanceNormalization from keras.layers import Input, Dense, Reshape, Flatten, Dropout, Concatenate from keras.layers import BatchNormalization, Activation, ZeroPadding2D, Add from keras.layers.advanced_activations import LeakyReLU, ELU diff --git a/requirements.txt b/requirements.txt index eb933ff286..18873f6735 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,6 +26,7 @@ jupyter-core==4.4.0 Keras==2.2.4 Keras-Applications==1.0.7 Keras-Preprocessing==1.0.9 +git+https://www.github.com/keras-team/keras-contrib.git kiwisolver==1.0.1 Markdown==3.0.1 MarkupSafe==1.1.0