Giter Site home page Giter Site logo

lsablica / generative_deep_learning_2nd_edition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from davidadsp/generative_deep_learning_2nd_edition

0.0 0.0 0.0 14.14 MB

The official code repository for the second edition of the O'Reilly book Generative Deep Learning: Teaching Machines to Paint, Write, Compose and Play.

Home Page: https://www.oreilly.com/library/view/generative-deep-learning/9781098134174/

License: Apache License 2.0

Shell 1.13% Python 4.05% Jupyter Notebook 94.68% Dockerfile 0.15%

generative_deep_learning_2nd_edition's Introduction

๐Ÿฆœ Generative Deep Learning - 2nd Edition Codebase

The official code repository for the second edition of the O'Reilly book Generative Deep Learning: Teaching Machines to Paint, Write, Compose and Play.

O'Reilly link

Amazon US link

๐Ÿ“– Book Chapters

Below is a outline of the book chapters:

Part I: Introduction to Generative Deep Learning

  1. Generative Modeling
  2. Deep Learning

Part II: Methods

  1. Variational Autoencoders
  2. Generative Adversarial Networks
  3. Autoregressive Models
  4. Normalizing Flows
  5. Energy-Based Models
  6. Diffusion Models

Part III: Applications

  1. Transformers
  2. Advanced GANs
  3. Music Generation
  4. World Models
  5. Multimodal Models
  6. Conclusion

๐ŸŒŸ Star History

๐Ÿš€ Getting Started

Kaggle API

To download some of the datasets for the book, you will need a Kaggle account and an API token. To use the Kaggle API:

  1. Sign up for a Kaggle account.
  2. Go to the 'Account' tab of your user profile
  3. Select 'Create API Token'. This will trigger the download of kaggle.json, a file containing your API credentials.

The .env file

Create a file called .env in the root directory, containing the following values (replacing the Kaggle username and API key with the values from the JSON):

JUPYTER_PORT=8888
TENSORBOARD_PORT=6006
KAGGLE_USERNAME=<your_kaggle_username>
KAGGLE_KEY=<your_kaggle_key>

Get set up with Docker

This codebase is designed to be run with Docker.

If you've never used Docker before, don't worry! I have included a guide to Docker in the Docker README file in this repository. This includes a full run through of why Docker is awesome and a brief guide to the Dockerfile and docker-compose.yml for this project.

Building the Docker image

If you do not have a GPU, run the following command:

docker compose build

If you do have a GPU that you wish to use, run the following command:

docker compose -f docker-compose.gpu.yml build

Running the container

If you do not have a GPU, run the following command:

docker compose up

If you do have a GPU that you wish to use, run the following command:

docker compose -f docker-compose.gpu.yml up

Jupyter will be available in your local browser, on the port specified in your env file - for example

http://localhost:8888

The notebooks that accompany the book are available in the /notebooks folder, organized by chapter and example.

๐Ÿž๏ธ Downloading data

The codebase comes with an in-built data downloader helper script.

Run the data downloader as follows (from outside the container), choosing one of the named datasets below:

bash scripts/download.sh [faces, bricks, recipes, flowers, wines, cellosuites, chorales]

๐Ÿ“ˆ Tensorboard

Tensorboard is really useful for monitoring experiments and seeing how your model training is progressing.

To launch Tensorboard, run the following script (from outside the container):

  • <CHAPTER> - the required chapter (e.g. 03_vae)
  • <EXAMPLE> - the required example (e.g. 02_vae_fashion)
bash scripts/tensorboard.sh <CHAPTER> <EXAMPLE>

Tensorboard will be available in your local browser on the port specified in your .env file - for example:

http://localhost:6006

โ˜๏ธ Using a cloud virtual machine

To set up a virtual machine with GPU in Google Cloud Platform, follow the instructions in the Google Cloud README file in this repository.

๐Ÿ“ฆ Other resources

Some of the examples in this book are adapted from the excellent open source implementations that are available through the Keras website. I highly recommend you check out this resource as new models and examples are constantly being added.

generative_deep_learning_2nd_edition's People

Contributors

davidadsp avatar dsanr avatar faisito avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.