The goal of this assignment is to develop important Tensorflow skills and associated intuition for PDP (Parallel Distributed Processing, David Rumelhart) style two layer networks. By design this assignment is staying with a simpler more explicit architecture in purprose even though we understand well that more modern convolutional neural networks will achieve superior recognition performance. Therefore, the goal of this assignment is to construct a complete working classifier that operates on the animal chips developed in the previous assignment. Further, you must base your solution on the basic code developed by Dan Aloni.

Keep in mind that the final assignment will set you free to pull in as many modern tricks and pre-trained networks as you choose. However, also keep in mind how much detail is hidden from you in these more modern machine learning models. Therefore, use this assignment to its fullest as your opportunity to make sure you undersand in very concrete terms all aspects of the two layer network you will build and train in this assignment.

Aloni's 2 Layer Network

For this assignment you are being asked to use a basic 2 layer network as defined by the backpropogation code developed by Dan Aloni. Here is a somewhat modified version of this code that should be your starting point. The source file along with the dataset file needed for Task 3 are avalable here;

For this assignment you must stick with a 2 layer network as laid out in the provided code. In working with the animal chip data you will want to down sample the animal chip images. You may experiment with different resolution choices. You will want to strike a balance between efficiency in the context of the current code versus potential loss of valuable detail in the image chips.

The code you are starting with is very brute force in terms of the implementation of back propogation. Tensorflow comes with much more integrated and encapsulated ways of updating network weights. You will be useing those high-level tools in the next programming assignment. For this assignment you must utilize the backpropogation mechanism provided in the code example.

Dataset Mechanics

It will be necessary in this assignment to develop a BMGR dataset handling capability based upon the dataset code associated with the MNIST data. Unlike the rest of this assignment, where I want teams to do their own code development, here I encourage the sharing of resources on this part of the assignment through the course Piazza site.

Collectively the construction of a dataset.py will benefit all groups and I am hoping that by openning up collaboration on this part of PA4 there will be an overal economy of effort.

Specific Tasks

Here are the specific tasks I expect each team to complete and report on at the end of the assignment.

Task 1: Explore MNIST Solutions
Run some tests of Aloni's code on the MNIST dataset exploring changes to the following. Vary the learning rate and the number of hidden units. Generate some feel for better versus worse configurations relative to solution accuracy. Generate visual expressions, i.e. images, of the w_1 weight changes for different hidden nodes.
Task 2: Dataset Mechanism for Animal Chips
For the rest of this assignment it will be necessary to adapt the dataset.py code to serve up training and test BMGR animal image chips along with labels. This should be done by creating a file dataset_bmgr.py . In the case of this task teams are encouraged to share their implementations through Piazza in order to compare notes and expedite completion of this step. Time saving suggestions are welcome and recall the original file came from this GitHub site. Also, there is a distinct folder on CS510 Piazza site for sharing information related to this activity. Notice that the distinction between training and test data is embedded in the construction of the dataset API. Hence, initially, several different training versus test splits may arise. For the next programming assignment we will standardize that choice. One other important suggestion. What we need is the ability to serve up training and test pairs where a pair is a source image and a label. That must be adpated. What we do not necessarilly need nor even desire is the internet streaming aspects of the API. It is entirely fine to place the source images in a local subdirectory and draw from that directory. Recalll all of the image chips are now available in the folder /s/parsons/h/proj/vision/data/bmgr/cs510chips
Task 3: Train and Test BMBR Aloni Network
Using the dataset mechanism developed in Task 2, train a 2 layter network to identify the anmail types present in the animal chips produced for PA3. Stick with the general architecture already provided in the sample code. Experiment a bit with the size of the input image chips. Include 64 by 64 pixel chips among your options. Be prepared to show a confusion matrix along with an overal correct recognition rate for your network.
Task 4: Training Augmentation
Extend your training set through some standard data augmentation techniques. The two most obvious are to fip the images left-to-right and also introduce small translational perturbations. As part of this task monitor and contribute to the Piazza board for this assignment to get and share suggestions. As with Task 3, be prepared to show a confusion matrix along with an overall correction recognition rate for your network using augmented training.
Task 5: Inspect Weights
Be prepared to show how weights for at least one layer one node change from the start to finish of training. This includes displaying the delta weights and weights themselves appear when displayed as an image. You have a head start at this task provided in the code available above.


This is a team project using the same teams as PA3.

For this assignment grading will be done based upon meeting with the instructor. Each team will pick a time (signup coming later) and meet with the instructor and present and discuss their solution. We will hold these meetings on the afternoon of Wednesday April 24.


No Addendum at this time.

Is our goalYourYou're you'reSo theThat is it