From 1beb92ce92a23c0a24ecced5031307e6afba2136 Mon Sep 17 00:00:00 2001 From: Joseph Handzik Date: Thu, 26 Sep 2019 09:30:32 -0500 Subject: [PATCH 1/6] Update Dockerfiles to include required graphviz packages Based on success path from Issue #18, verified on Dockerfile.cpu run using 04_01_gan_camel_train Signed-Off-By: Joe Handzik --- Dockerfile.cpu | 4 ++++ Dockerfile.gpu | 4 ++++ 2 files changed, 8 insertions(+) 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 From ae8c54efefe5bbb97a09664b10c03333f1925446 Mon Sep 17 00:00:00 2001 From: David Foster Date: Mon, 14 Oct 2019 00:59:51 +0100 Subject: [PATCH 2/6] fix #9 --- requirements.txt | 1 + 1 file changed, 1 insertion(+) 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 From a745ab0d0b957a4966832beb77ca9c8fe40f26e2 Mon Sep 17 00:00:00 2001 From: David Foster Date: Mon, 14 Oct 2019 01:05:33 +0100 Subject: [PATCH 3/6] change readme --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 6daad1fede..62df528cf8 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,10 @@ https://learning.oreilly.com/library/view/generative-deep-learning/9781492041931 https://www.amazon.com/Generative-Deep-Learning-Teaching-Machines/dp/1492041947/ref=sr_1_1 +## Tensorflow + +This branch uses standalone Keras with a Tensorflow 1.14 backend. See the `tensorflow_2` branch for the Keras within Tensorflow 2.0 version of the codebase. + ## Structure This repository is structured as follows: From 4287f9f382eea57d89f83bdcc6273a89fcdec482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20Sevin=C3=A7?= Date: Tue, 3 Dec 2019 15:21:31 +0100 Subject: [PATCH 4/6] Fix import error for InstanceNormalization Fixes #28 --- models/cycleGAN.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From a731f5077e2db705a963b6f31a84e929c1d486fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emre=20Sevin=C3=A7?= Date: Fri, 13 Dec 2019 16:31:46 +0100 Subject: [PATCH 5/6] Fix #30 Fix #30 --- 07_01_notation_compose.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" ] }, { From 2a7b8c92ea07ddd796d7a895b171dbc5fcc2c7cd Mon Sep 17 00:00:00 2001 From: David Foster Date: Thu, 23 Feb 2023 00:57:53 +0000 Subject: [PATCH 6/6] Update README.md --- README.md | 49 ++++++++----------------------------------------- 1 file changed, 8 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 62df528cf8..625a0ba739 100644 --- a/README.md +++ b/README.md @@ -1,48 +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. -## Tensorflow - -This branch uses standalone Keras with a Tensorflow 1.14 backend. See the `tensorflow_2` branch for the Keras within Tensorflow 2.0 version of the codebase. - -## 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.