Skip to content

Assignments

Iver Jordal edited this page Apr 8, 2017 · 11 revisions

When you're done with the tutorial, it's really up to you what you want to do next. However, here are some suggestions:

  • See what the neural output image looks like during training
  • Try with bigger images than 3x3, for example 64x64 or 128x128. For example, load PNG files from your file system. If you try to train on larger images (256x256 or larger), the training process slows down significantly.
  • Try increasing the size of your neural network. Add more layers and add more hidden nodes in each layer.

The three suggestions above are implemented in train.py

Here are some more suggestions, if you have time:

  • Add support for color output. Basically, you can try to have 3 or 4 entries (RGB or RGBA) in the output vector instead of just one (greyscale). Example implementation: train_color.py
  • Train the neural network on only a part of the image, and afterwards let it interpolate output values on areas where it hasn't been trained. One way to do this is loading a second image that is a "mask", an image with only black and white pixels, that indicates which of the pixels in the input image should be included in the training data. Example image + mask: landscape.png and landscape_mask.png
  • Encode several images in the same neural network. For starters, you could try to extend the input vector so it has 3 entries instead of 2. The third entry could be a boolean that tells the neural network which of two images it should output. Afterwards, when the neural network is trained, try to "fade" between the images by setting the third input entry to values between 0 and 1. Example implementation: train_many.py and interpolate_between_many.py
  • Plot the loss curve. Matplotlib is good for this. Try different optimizers and compare their convergence rate.
  • Try to standardize the input and output data, and see how that affects the bias of the neural network output. When the (0, 0) coordinates represent the center of the image rather than top left, the neural network will probably learn to fit the center of the image first, rather than the top left area.
  • Try to add more input features. For example, try sin(x*2), cos(x*2), sin(y*2), sin(y*2), sqrt(x), sqrt(y), x**2, y**2, x-0.5, x+0.5, y-0.5, y+0.5

Clone this wiki locally