Homework 2: Available 9/16/2016, Due 10/1/2016.
NOTE: Only the software portion can be done in teams of up to three people, your report should be your own work.
Handing in assignment on compass:
  1. Report in pdf format. File name should be net_id_hw2_report (e.g. yeh17_hw2_report.pdf)
  2. Code for both code-from-scratch and TensorFlow in TGZ or ZIP format. File name should be net_id_hw2_code (e.g. yeh17_hw2_code.zip)
  3. Include your team members' name in the submission description and report.
  4. Make sure the uploaded file is correct. Missing or corrupted files will be considered late. (You can download the uploaded file to verify)

Data

The dataset is here, same file as assignment 1. Refer to the README file for more details.

Software Requirements

  1. Do NOT use ipython notebook.
  2. Modularized your code, a single script code is difficult to read.
  3. Use a relative path when accessing data. Clearly write in the README file where to store the data relative to the base directory.

Pencil-and-Paper

In this part of the assignment, you will compute the derivatives/gradients and backpropped error for the following common modules in a neural network.
  1. Derivative of Softmax
  2. Recall the softmax function:
    What is $\frac{\partial y[k]}{\partial z[j]}$?
  3. Negative Log Likelihood loss for Multi-Class
  4. Recall the negative log likelihood:
    What is $ \frac{\partial L}{\partial \hat{y}_i[j]}$ ?
  5. Avg-pooling (1D)
  6. Recall Avg-pooling (1D) operation with window size W:
    What is $ \frac{\partial y[i]}{\partial x[j]}$ ?
  7. Max-pooling (1D)
  8. Recall Max-pooling (1D) operation with window size W:
    What is $ \frac{\partial y[i]}{\partial x[j]}$ ?
  9. Convolutional layer (1D)
  10. Recall Convolution (1D) operation, assume $\vec{w}$ is length 3, and zero index at the center.:
    What is $ \frac{\partial y[i]}{\partial x[j]}$? What is $ \frac{\partial y[i]}{\partial w[j]}$ ?

Code-From-Scratch

Perform 9-way classification among the 9 letters in the ee-set using a fully-connected neural network with 2 hidden layers. Use the first 70 frames of each example and drop any example that is shorter than 70 frames. The use mini-batch gradient descent for optimization, you can pick the batch size. The test set accuracy is in the range of 35% to 50%.
  1. Experiment with different number of hidden-nodes, {10, 50}, assume the two hidden layers have the same size.
  2. Experiment with different type of nonlinearities [sigmoid, tanh, relu]

  3. What to turn in:
    • Methods:
      1. Describe the functions you wrote, and the overall structure of your code.
      2. Describe the model architecture and specific hyperparameter you have chosen.
      3. Report the total number of weights in the models.
    • Results:
      1. Report training and testing accuracy for your best model.
      2. Report training and testing accuracy for all the models. (All combinations between nonlinearities and number of hidden nodes.)
      3. Report the running time (in seconds) for one iteration of backpropagation on model with 10 and 50 hidden-nodes. Also describe how the runng time varies with batch size.
      4. Plot training and testing classification confusion matrix for your best model.
    • Code: Submit an auxiliary TGZ or ZIP file containing your code. Note: A README.txt describing how to run your code should be included in the zip file

TensorFlow

Perform 9-way classification among the 9 letters in the ee-set using the TDNN architecture of Waibel, Hanazawa, Hinton, Shikano and Lang. Use the first 70 frames of each example and drop any example that is shorter than 70 frames. The use mini-batch gradient descent for optimization, you can pick the batch size. The test set accuracy is in the range of 35% to 50%.

Use the following network architecture:
Input layer: (J=16, N=2), Hidden Layer 1: (J=8, N=4), Hidden Layer 2: (J=3, N=1), Final Layer: multi-class logistic regression.

Next, try changing the TDNN architecture or even CNN architecture and see if you can improve the accuracy (The accuracy for this part will not affect your grade) Here is a TensorFlow tutorial with CNN on the MNIST datase.
What to turn in: