Shift Invariance

Overview

The purpose of this assignment is to learn about shit invariance and how to mitigate it.

Assignment

This is an extra credit assignment and it is worth 25 points. Please work on it by yourself. Please do not use GenAI tools to develop and test the code. You may work with either your FFnetRelu code or your CNN LeNet5 code.
  1. There are two components: to test shift invariance of your current network and to experiment with ways of mitigating for the degrading performance.
  2. Please create a document that is the lab manual. Please add your name to the top of it.
  3. Either dowload the testing code for the FFnet or for lenet5. This code tests the trained network on 1000 (rather than 10000) images that have been shifted by shiftOffset number of bits in two dimensions. Notice that for the feedforward network, I convert the image into 2D, then shift, then convert back to 1D. Notice that even though the FFnet testing code is called "MINSTOneLayer" you can create FFNet with more than one layer, as I have done for testing purposes. You may wish to experiment with networks that have two layers, in addition to agumenting the training data.
  4. Run the testing code for the following shift offsets: 0, 2, 4, and 6. Enter the accuracy on the shifted test code:
  5. A key way to remedy the loss of accuracy is to add shifted training data. Do so for offsets of 2, 4 and 6. How did your network do? How many of the training digits did you shift? Please provide hyperparameters and accuracy results in a table.
  6. Please submit your lab manual and code.