Reader small image

You're reading from  Generative Adversarial Networks Cookbook

Product typeBook
Published inDec 2018
PublisherPackt
ISBN-139781789139907
Edition1st Edition
Right arrow
Author (1)
Josh Kalin
Josh Kalin
author image
Josh Kalin

Josh Kalin is a Physicist and Technologist focused on the intersection of robotics and machine learning. Josh works on advanced sensors, industrial robotics, machine learning, and automated vehicle research projects. Josh holds degrees in Physics, Mechanical Engineering, and Computer Science. In his free time, he enjoys working on cars (has owned 36 vehicles and counting), building computers, and learning new techniques in robotics and machine learning (like writing this book).
Read more about Josh Kalin

Right arrow

Training this model


Training is always an adventure—there are so many pitfalls when developing GAN architectures. In this training class, we aim to provide a simple setup to train a GAN that takes a 2D image and creates a 3D model.

Getting ready

This is the final recipe in our chapter, so we've got a few files to create—the train.py, run.py, and run.sh files. Before continuing, check to make sure you have the exact same directory structure in your directory:

├── data
├── docker
│   ├── build.sh
│   ├── clean.sh
│   ├── Dockerfile
│   └── kaggle.json
├── out
├── README.md
├── run_autoencoder.sh
├── run.sh
└── src
    ├── discriminator.py
    ├── encoder_model.h5
    ├── encoder.py
    ├── gan.py
    ├── generator.py
    ├── run.py
    ├── train.py
    ├── x_test_encoded.npy
    └── x_train_encoded.npy

How to do it...

There are a few steps to successfully training this model—preparing the class, importing the data, training, plotting, and running the training code. This recipe will cover all of...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Generative Adversarial Networks Cookbook
Published in: Dec 2018Publisher: PacktISBN-13: 9781789139907

Author (1)

author image
Josh Kalin

Josh Kalin is a Physicist and Technologist focused on the intersection of robotics and machine learning. Josh works on advanced sensors, industrial robotics, machine learning, and automated vehicle research projects. Josh holds degrees in Physics, Mechanical Engineering, and Computer Science. In his free time, he enjoys working on cars (has owned 36 vehicles and counting), building computers, and learning new techniques in robotics and machine learning (like writing this book).
Read more about Josh Kalin