This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
cs501r_f2016:lab7 [2016/10/10 16:02] wingated |
cs501r_f2016:lab7 [2017/10/17 21:55] wingated |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====WARNING THIS LAB SPEC IS UNDER DEVELOPMENT:==== | ||
+ | |||
+ | |||
====Objective:==== | ====Objective:==== | ||
Line 10: | Line 13: | ||
For this lab, you will need to implement a generative adversarial | For this lab, you will need to implement a generative adversarial | ||
- | network (GAN). You will generate images that look like MNIST digits. | + | network (GAN). |
+ | Specifically, we will be using the technique outlined in the paper [[https://arxiv.org/pdf/1704.00028|Improved Training of Wasserstein GANs]]. | ||
- | You should turn in an iPython notebook that shows a single plot, which | + | You should turn in an iPython notebook that shows a two plots. The first plot should be random samples from the final generator. The second should show interpolation between two faces by interpolating in ''z'' space. |
- | will be samples from the final GAN. | + | |
- | An example of my final samples is shown at the right. | + | You must also turn in your code, but your code does not need to be in a notebook, if it's easier to turn it in separately (but please zip your code and notebook together in a single zip file). |
- | You are welcome to turn in your image and your code separately. | + | An example of my final samples is shown at the right. |
**NOTE:** this lab is complex. Please read through **the entire | **NOTE:** this lab is complex. Please read through **the entire | ||
Line 49: | Line 52: | ||
discriminator and generator separately, we'll need to be able to train | discriminator and generator separately, we'll need to be able to train | ||
on subsets of variables. | on subsets of variables. | ||
- | |||
- | This lab is a bit more complex than some of the others, so we are | ||
- | providing [[http://liftothers.org/byu/lab7_scaffold.py|some scaffold code]] | ||
In the scaffold code, you will find the following: | In the scaffold code, you will find the following: | ||
Line 120: | Line 120: | ||
- ''H0'': A 2d convolution on ''imgs'' with 32 filters, followed by a leaky relu | - ''H0'': A 2d convolution on ''imgs'' with 32 filters, followed by a leaky relu | ||
- ''H1'': A 2d convolution on ''H0'' with 64 filters, followed by a leaky relu | - ''H1'': A 2d convolution on ''H0'' with 64 filters, followed by a leaky relu | ||
- | - ''H2'': A linear layer from ''H1'' to a 1024 dimensional vector | + | - ''H2'': A linear layer from ''H1'' to a 1024 dimensional vector, followed by a leaky relu |
- ''H3'': A linear layer mapping ''H2'' to a single scalar (per image) | - ''H3'': A linear layer mapping ''H2'' to a single scalar (per image) | ||
- The final output should be a sigmoid of ''H3''. | - The final output should be a sigmoid of ''H3''. |