Discussion: April 11th
Deadline (optional): April 11th, 9am
This first assignment is intended as a refresher on DL models as well as a first look at why we might need generative models by considering how other models fail at modeling data distributions properly. Use this as an opportunity to set up training/experimentation workflows that you can reuse in later assignments. Please read the entire text carefully for information on submissions etc.
This assignment does not need to be handed in. However, if you struggle with the contents of part 1, you likely do not fulfill the prerequisites for this class.
Assignments will generally consist of writing code, usually to implement some kind of generative model and to apply it/play around with it a little. If something is unclear, or you run into trouble, ask. Do not spend all week doing nothing! Ask questions on Mattermost (or via Gitlab issue) in a public channel since other people might have the same question (or be able to provide an answer)!
Programming must be done in Python 3.x and Tensorflow 2.x.
Code should be your own. In the event that you take parts of code from elsewhere, clearly indicate this and provide a source. Do not copy-paste complete tutorials from elsewhere as your submission. Plagiarism is not permitted!
Tasks are often deliberately open-ended in order to encourage exploration. Don’t concern yourself with achieving X% of points. These assignments are for you to gain practical experience and to get into the habit of asking (and answering) interesting questions.
Unfortunately, we currently cannot supply GPU servers for the class. You will have to work on your own machine or with Google Colab. If you need a refresher, see the general notes of last semester’s IDL class here.
For each assignment, your final results should be in a Jupyter notebook. Use images/plots liberally. Also, feel free to use markdown cells to write text to explain or discuss your code/results. Make sure that your notebooks include outputs. We should not have to run your notebooks to confirm that your code works correctly.
Submissions are handled via Moodle. Upload your file(s) before the deadline. Regular submission is obligatory to be admitted to the exam. You may miss at most two submissions (excluding the usual things like medical reasons, emergencies etc).
Assignments can be worked on in groups (up to ~3 people). However, each group member must upload the solution separately. Submissions should include information on who the group members are. All members needs to be able to present the solution (no freeloading!).
The deadline is generally on Thursday morning.
Since autoencoders consist of an encoder and a decoder, they could in principle be used to generate data through use of the decoder on its own. Try this:
Are you happy with the outputs? You most likely aren’t. Offer some hypotheses as to why this might be. Think about and propose (and, if you want to, implement) ways to produce better codes/images.
When training a model in part 1, you likely used an “off-the-shelf” loss function such as binary cross-entropy or mean squared error. In this section, we will take a step back and think about deriving loss functions based on prior considerations.
p(x|z) where x is the data and
z the latent code. We will ignore the encoder for now.
theta. Reframe the
decoder neural network as outputting those parameters. Now, we have expressed
p(x|z) via p(x|theta) with theta = decoder(z).theta as the output of the decoder, backpropagation
automatically trains the network parameters such that the distribution parameters
theta are optimized given our loss.To set some expectations, using a Gaussian distribution with fixed variance should give you the squared error as a loss function; using a Bernoulli distribution should result in the binary cross-entropy.