|
| 1 | +\documentclass{article} |
| 2 | +\usepackage{amsmath,amssymb} |
| 3 | +\usepackage{graphicx} |
| 4 | +\usepackage{enumerate} |
| 5 | +\usepackage{hyperref} |
| 6 | +\usepackage{subcaption} |
| 7 | +\usepackage{caption} |
| 8 | +\usepackage{xcolor} |
| 9 | +\usepackage{float} |
| 10 | + |
| 11 | +\pagestyle{empty} \addtolength{\textwidth}{1.0in} |
| 12 | +\addtolength{\textheight}{0.5in} |
| 13 | +\addtolength{\oddsidemargin}{-0.5in} |
| 14 | +\addtolength{\evensidemargin}{-0.5in} |
| 15 | +\newcommand{\ruleskip}{\bigskip\hrule\bigskip} |
| 16 | +\newcommand{\nodify}[1]{{\sc #1}} |
| 17 | +\newcommand{\points}[1]{{\textbf{[#1 points]}}} |
| 18 | +\newcommand{\subquestionpoints}[1]{{[#1 points]}} |
| 19 | +\newenvironment{answer}{{\bf Answer:} \sf }{}% |
| 20 | + |
| 21 | +\newcommand{\bitem}{\begin{list}{$\bullet$}% |
| 22 | +{\setlength{\itemsep}{0pt}\setlength{\topsep}{0pt}% |
| 23 | +\setlength{\rightmargin}{0pt}}} |
| 24 | +\newcommand{\eitem}{\end{list}} |
| 25 | + |
| 26 | +\setlength{\parindent}{0pt} \setlength{\parskip}{0.5ex} |
| 27 | +\setlength{\unitlength}{1cm} |
| 28 | + |
| 29 | +\newcommand{\pa}[1]{[[PA: #1]]} |
| 30 | + |
| 31 | +\renewcommand{\Re}{{\mathbb R}} |
| 32 | +\newcommand{\E}{{\rm E}} |
| 33 | +\begin{document} |
| 34 | + |
| 35 | +\pagestyle{myheadings} \markboth{}{CS 294-158 Deep Unsupervised Learning, Homework 3, Spring 2024} |
| 36 | + |
| 37 | +{\huge |
| 38 | +\noindent Homework 3: GAN Models} |
| 39 | +\ruleskip |
| 40 | + |
| 41 | +{\bf Deliverable}: This PDF write-up by {\bf Tuesday March 6th, 23:59pm}. Your PDF should be generated by simply replacing the placeholder images of this LaTeX document with the appropriate solution images that will be generated automatically when solving each question. The solution images are automatically generated and saved using the accompanying IPython notebook. Your PDF is to be submitted into Gradescope. This PDF already contains a few solution images. These images will allow you to check your own solution to ensure correctness. |
| 42 | + |
| 43 | + |
| 44 | +\vspace{.2in} |
| 45 | + |
| 46 | +%-------------------------------------------------------------------------------- |
| 47 | +%-------------------------------------------------------------------------------- |
| 48 | +%-------------------------------------------------------------------------------- |
| 49 | +\noindent {\bf Question 1: 1D Data} |
| 50 | +%-------------------------------------------------------------------------------- |
| 51 | +%-------------------------------------------------------------------------------- |
| 52 | +%-------------------------------------------------------------------------------- |
| 53 | + |
| 54 | +\begin{enumerate}[(a)] |
| 55 | + |
| 56 | +\item {\bf [10pt] Minimax GAN Objective} \\\\ |
| 57 | +\begin{figure}[H] |
| 58 | + \centering |
| 59 | + \begin{subfigure}{0.45\textwidth} |
| 60 | + \centering |
| 61 | + \includegraphics[width=\textwidth]{figures/q1a_epoch1.png} |
| 62 | + \caption{Samples at epoch 1} |
| 63 | + \end{subfigure} |
| 64 | + \begin{subfigure}{0.45\textwidth} |
| 65 | + \centering |
| 66 | + \includegraphics[width=\textwidth]{figures/q1a_final.png} |
| 67 | + \caption{Final samples} |
| 68 | + \end{subfigure} |
| 69 | + \\ |
| 70 | + \begin{subfigure}{0.34\textwidth} |
| 71 | + \centering |
| 72 | + \includegraphics[width=\textwidth]{figures/q1a_losses.png} |
| 73 | + \caption{GAN loss curve} |
| 74 | + \end{subfigure} |
| 75 | +\end{figure} |
| 76 | +\newpage |
| 77 | + |
| 78 | +\item {\bf [10pt] Nonsaturating Objective} \\\\ |
| 79 | +\begin{figure}[H] |
| 80 | + \centering |
| 81 | + \begin{subfigure}{0.45\textwidth} |
| 82 | + \centering |
| 83 | + \includegraphics[width=\textwidth]{figures/q1b_epoch1.png} |
| 84 | + \caption{Samples at epoch 1} |
| 85 | + \end{subfigure} |
| 86 | + \begin{subfigure}{0.45\textwidth} |
| 87 | + \centering |
| 88 | + \includegraphics[width=\textwidth]{figures/q1b_final.png} |
| 89 | + \caption{Final samples} |
| 90 | + \end{subfigure} |
| 91 | + \\ |
| 92 | + \begin{subfigure}{0.34\textwidth} |
| 93 | + \centering |
| 94 | + \includegraphics[width=\textwidth]{figures/q1b_losses.png} |
| 95 | + \caption{GAN loss curve} |
| 96 | + \end{subfigure} |
| 97 | +\end{figure} |
| 98 | +\end{enumerate} |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | +%-------------------------------------------------------------------------------- |
| 103 | +%-------------------------------------------------------------------------------- |
| 104 | +%-------------------------------------------------------------------------------- |
| 105 | +\newpage |
| 106 | +\noindent {\bf Question 2: WGAN-GP on CIFAR-10 [35pt]} |
| 107 | +%-------------------------------------------------------------------------------- |
| 108 | +%-------------------------------------------------------------------------------- |
| 109 | +%-------------------------------------------------------------------------------- |
| 110 | + |
| 111 | + |
| 112 | +\\ |
| 113 | + |
| 114 | +Final inception score: \textbf{TODO} \\ |
| 115 | +Final Fréchet inception distance: \textbf{TODO} |
| 116 | +\begin{figure}[H] |
| 117 | + \centering |
| 118 | + \begin{subfigure}{0.6\textwidth} |
| 119 | + \centering |
| 120 | + \includegraphics[width=\textwidth]{figures/q2_samples.png} |
| 121 | + \caption{Samples} |
| 122 | + \end{subfigure} |
| 123 | + \\ |
| 124 | + \begin{subfigure}{0.6\textwidth} |
| 125 | + \centering |
| 126 | + \includegraphics[width=\textwidth]{figures/q2_losses.png} |
| 127 | + \caption{Training curve} |
| 128 | + \end{subfigure} |
| 129 | + |
| 130 | +\end{figure} |
| 131 | + |
| 132 | + |
| 133 | +%-------------------------------------------------------------------------------- |
| 134 | +%-------------------------------------------------------------------------------- |
| 135 | +%-------------------------------------------------------------------------------- |
| 136 | +\newpage |
| 137 | +\noindent {\bf Question 3: Quantization with GANS [40 pt]}\\ |
| 138 | +%-------------------------------------------------------------------------------- |
| 139 | +%-------------------------------------------------------------------------------- |
| 140 | +%-------------------------------------------------------------------------------- |
| 141 | + |
| 142 | +\noindent {\bf Part a: Vanilla VQGAN [25 pt]} |
| 143 | +Final l2 validation reconstruction loss: \textbf{TODO} \\ |
| 144 | +\begin{figure}[H] |
| 145 | + \centering |
| 146 | + \begin{subfigure}{0.45\textwidth} |
| 147 | + \centering |
| 148 | + \includegraphics[width=\textwidth]{figures/q3a_gan_losses.png} |
| 149 | + \caption{Discriminator losses} |
| 150 | + \end{subfigure} |
| 151 | + \begin{subfigure}{0.45\textwidth} |
| 152 | + \centering |
| 153 | + \includegraphics[width=\textwidth]{figures/q3a_l2_losses.png} |
| 154 | + \caption{L2 losses} |
| 155 | + \end{subfigure} |
| 156 | + \\ |
| 157 | + \begin{subfigure}{0.4\textwidth} |
| 158 | + \centering |
| 159 | + \includegraphics[width=\textwidth]{figures/q3a_lpips_losses.png} |
| 160 | + \caption{LPIPS losses} |
| 161 | + \end{subfigure} |
| 162 | + \begin{subfigure}{0.6\textwidth} |
| 163 | + \centering |
| 164 | + \includegraphics[width=\textwidth]{figures/q3a_reconstructions.png} |
| 165 | + \caption{Reconstructions} |
| 166 | + \end{subfigure} |
| 167 | +\end{figure} |
| 168 | + |
| 169 | +\noindent {\bf Part b: ViT-VQGAN [15 pt]} |
| 170 | +Final l2 validation reconstruction loss: \textbf{TODO} \\ |
| 171 | +\begin{figure}[H] |
| 172 | + \centering |
| 173 | + \begin{subfigure}{0.45\textwidth} |
| 174 | + \centering |
| 175 | + \includegraphics[width=\textwidth]{figures/q3b_gan_losses.png} |
| 176 | + \caption{Discriminator losses} |
| 177 | + \end{subfigure} |
| 178 | + \begin{subfigure}{0.45\textwidth} |
| 179 | + \centering |
| 180 | + \includegraphics[width=\textwidth]{figures/q3b_l2_losses.png} |
| 181 | + \caption{L2 losses} |
| 182 | + \end{subfigure} |
| 183 | + \\ |
| 184 | + \begin{subfigure}{0.4\textwidth} |
| 185 | + \centering |
| 186 | + \includegraphics[width=\textwidth]{figures/q3b_lpips_losses.png} |
| 187 | + \caption{LPIPS losses} |
| 188 | + \end{subfigure} |
| 189 | + \begin{subfigure}{0.6\textwidth} |
| 190 | + \centering |
| 191 | + \includegraphics[width=\textwidth]{figures/q3b_reconstructions.png} |
| 192 | + \caption{Reconstructions} |
| 193 | + \end{subfigure} |
| 194 | +\end{figure} |
| 195 | + |
| 196 | +%-------------------------------------------------------------------------------- |
| 197 | +%-------------------------------------------------------------------------------- |
| 198 | +%-------------------------------------------------------------------------------- |
| 199 | +\newpage |
| 200 | +\noindent {\bf Bonus Questions (Optional)} |
| 201 | +%-------------------------------------------------------------------------------- |
| 202 | +%-------------------------------------------------------------------------------- |
| 203 | +%-------------------------------------------------------------------------------- |
| 204 | +\begin{enumerate} |
| 205 | + |
| 206 | +\item {\bf [20pt] CycleGAN} \\\\ |
| 207 | +\begin{figure}[H] |
| 208 | + \centering |
| 209 | + \begin{subfigure}{0.5\textwidth} |
| 210 | + \centering |
| 211 | + \includegraphics[width=\textwidth]{figures/qbonus_mnist.png} |
| 212 | + \caption{MNIST: original images, translations, and reconstructions} |
| 213 | + \end{subfigure} |
| 214 | + \\ |
| 215 | + \begin{subfigure}{0.5\textwidth} |
| 216 | + \centering |
| 217 | + \includegraphics[width=\textwidth]{figures/qbonus_colored_mnist.png} |
| 218 | + \caption{Colored MNIST: original images, translations, and reconstructions} |
| 219 | + \end{subfigure} |
| 220 | +\end{figure} |
| 221 | +\end{enumerate} |
| 222 | + |
| 223 | +\end{document} |
0 commit comments