# Homework 3

Submission date: January 16th, 2020

## Topics

• Sequence models for text generation
• Image generation with a Variational Autoencoder
• Generative adversarial networks

The assignment code is available here.

1. 2020-01-06
• Part 1: Fixed order of arguments in the post_epoch_fn for training.
• Part 2: Correction in the formula for the reparametrization trick: $\sigma^2$ replaced with $\sigma$.

To update, simply replace the original notebooks with the new ones. No code modifications are necessary, but make sure you implemented the reparametrization trick using the correct formula.

2. 2020-01-08
• Part 3: There was an unnecessary break statement in the GAN training block in the notebook.

To update, replace the original notebook. No code modifications are necessary.

## FAQ

Make sure to read the getting started page and the guide for using course servers.

Q: What is the checkpoint_file_final for?
A: You can use this to create your final submission with result images from your best-trained model. Just train with checkpoints enabled, and when you get results that your happy with rename the checkpoint file with _final. You don’t need to submit the checkpoint files (the main.py script will ignore them).

Q: How can we run long training blocks in the notebooks without running them interactively in jupyter-lab (e.g. from command line on the server)?
A: The easiest way is to simply copy the block (and relevant import statements) into a new python script and run that (with srun/sbatch on the server). A more automated way is to convert the whole notebook to a python script, for example:

jupyter nbconvert Part1_Sequence.ipynb --to python


And then run it with ipython within srun or sbatch, for example:

srun -c 2 --gres=gpu:1 ipython Part1_Sequence.py


Updated: