Giter Club home page Giter Club logo

gans-from-theory-to-production's Introduction

Deep Diving into GANs: from theory to production

With our accrued experience with GANs, we would like to guide you through the required steps to go from theory to production with this revolutionary technology.

Starting from the very basic of what a GAN is, passing trough TensorFlow implementation, using the most cutting edge APIs available in the framework, and finally, production-ready serving at scale using Google Cloud Functions.

This is the ZURU Tech way of making GANs: enjoy it.

Workshop's Table of contents

  • Introduction to GANs: Theory and Applications (SlideShare)

    • Generator
    • Discriminator
    • Intuitive explaination
    • Non saturating value function
    • Models definition
    • Training phase
    • Types of GANs
    • Conditional GANs
    • Applications
      • Unconditional GAN
      • Conditional GAN
  • GANs in TensorFlow 2.0:

    • What does a GAN learn?
    • Input data
    • Generator and discriminator networks: Keras functional API
    • Define input and instantiate networks
    • The loss function and the training procedure
    • Discriminator loss function
    • Generator loss function
    • Gradient ascent
    • Visualize training
    • Advantages and disadvantages
    • Bonus exercise: converting it to a Conditional GAN
  • Writing a GAN using AshPy and TensorFlow Datasets

    • AshPy Essentials
    • tfds and AshPy input format
    • Getting the data ready to use
    • DCGAN Theory and Practice
      • Generator: from noise to insight
      • Deconvolution
      • Batch Normalization
      • Discriminator
      • Loss function: a bridge between two networks
    • Training
    • Tensorboard
    • Towards Serving
  • Production:

    • Serving Models using TF 2.0 and Cloud Functions
    • Web Demo: Generating and Interpolating Faces

Requirements

This tutorial requires the following packages:

Setting up the environment (Linux, MacOS)

Clone the repository

git clone https://github.com/zurutech/gans-from-theory-to-production
cd gans-from-theory-to-production

Prepare a virtual environment

  • virtualenv: virtualenv venv && source venv/bin/activate

Installing the required packages

pip install -r no-gpu-requirements.txt
# or pip install -r gpu-requirements if a GPU with Compute Capability >= 3.0 is present

Start your Jupyter server

jupyter notebook . or the newer jupyter lab ..


If you're here, you're ready to go.

Happy workshop!


We're hiring!

Do you just love machine learning and you're also interested in Computer Vision? Join us at ZURU Tech!

Authors

gans-from-theory-to-production's People

Contributors

dependabot[bot] avatar emanueleghelfi avatar galeone avatar getmolmap avatar ilew avatar mr-ubik avatar stevemcc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gans-from-theory-to-production's Issues

Chapter 4 - Serving

  • Load Trained Model to CloudML Engine
  • Online Predictions
  • Batch Predictions
  • Colab Link
  • Google Cloud & Cloud ML Engine logos
  • Pull Request

Projects: What to do?

Should we try and keep Projects organized or should we delete it?

If we decide to keep, we could use it to either track development or showcase a roadmap.

Even after installing 1.13.1, Tf stays at 2.0 version


AttributeError Traceback (most recent call last)
in
5
6 # Import tfgan from contrib
----> 7 tfgan = tf.contrib.gan

AttributeError: module 'tensorflow' has no attribute 'contrib'

! pip install tensorflow==1.13.1
Requirement already satisfied: tensorflow==1.13.1 in /usr/local/lib/python3.7/dist-packages (1.13.1)

Code for TFGAN model

Add the code for the Generator and Discriminator written using the TFGAN module.

git pull failed with cannot create directory

remote: Total 36 (delta 1), reused 24 (delta 0), pack-reused 0
fatal: cannot create directory at '1. GAN: theory and applications': Invalid argument
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

Broken link to BONUS notebook

The link in the final line of 2.1. Writing a GAN from scratch.ipynb (A solution to this exercise can be found in the notebook: BONUS - Conditional GAN from scratch.) is broken.

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.