📗 Regular component (out of 5) should be submitted using the "Grade" and "Submit" buttons at the bottom of the page.
➩ Submission of the text file generated by the auto-grader to Canvas Assignment A1 is optional.
➩ Due date: August 9, no submission after that will be accepted.
📗 Competition component (out of 5) text file generated using Question 9 "Generate" button should be submitted to the Canvas Assignment A1C: Link
➩ Submission of an incorrectly formatted text file and any additional files to A1C will result in a competition score of \(-\infty\).
➩ Due date: July 7, no submission after that will be accepted under any circumstances.
📗 Note: Canvas A1 and A1C due date is the recommended due date, early submissions of competitions before the recommended due date will participate in trial competitions with the option to keep the score (not ranking).
📗 Hint: example submissions, discussion session schedules, and group recommendations (very different for different assignments) can be found on Piazza: Link.
📗 Enter your ID (the wisc email ID without @wisc.edu) here: and click (or hit the "Enter" key) 1,2,3,4,5,6,7,8,9,10a15
📗 You can also load from your saved file and click .
📗 If the questions are not generated correctly, try refresh the page using the button at the top left corner.
📗 The same ID should generate the same set of questions. Your answers are not saved when you close the browser. You could either copy and paste or load your program outputs into the text boxes for individual questions or print all your outputs to a single text file and load it using the button at the bottom of the page.
📗 Please do not refresh the page: your answers will not be saved.
📗 You can write the code in any programming language and using any large language models. You do not have to submit your code.
📗 (Introduction) In this project, you will train a neural network to recognize shapes, in particular, 3D shapes, with possible noise. The neural network should be fully connected with two hidden layers (ReLU activation, a maximum of 128 units and input layer with 1024 units, and output layer with 3 units (softmax activation). You can either write your own version of gradient descent, use someone else's code (please give proper attribution) or train the network using a package such as PyTorch, but you should design the network sizes yourself and create your version of the training set.
📗 (Part 1) Given a neural network with random weights, make sure you can make correct predictions on a simple test set.
📗 (Part 2) Train your network to make correct predictions on a simple test set without noise.
The simple test set for Part 1 and Part 2:
(the labels are sphere, cube, tetrahedron, sphere, cube, tetrahedron, ... repeated 100 times)
You can visualize these images using the following tool:
Item: out of 0
Note: if you are not planning to participate in the competition, you can also use this test set to train your network.
📗 (Competition) Submit your network to compete with other students to get the highest score on some test set. You can also submit three sets of images (9 images, from classes 0, 1, 2, 0, 1, 2, 0, 1, 2) to include in the competition test set (perhaps ones your network can predict correctly, but you think other students' networks might not).
Suppose you use a neural network with \(m\) hidden units, and if a test item \(i \in \left[n_{t}\right]\) (\(n_{t}\) is the number of test items submitted by your team \(t\), plus the items submitted by the course staff) has shape (one-hot encoding) \(y_{i} \in \left\{\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} , \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} , \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} \right\}\) and you are in team (one-hot encoding) \(t \in \left\{\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} , \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} , \begin{bmatrix} 0 \\ 0 \\ 1 \end{bmatrix} \right\}\), and your prediction \(\hat{y}_{i}\), then the score is computed as:
➩ You get higher score if your network is more certain about the correct prediction.
➩ You get twice the score for predicting your team shape (0 = sphere, 1 = cube, 2 = tetrahedron) correctly.
➩ The networks with fewer units will have a minor impact on your score, mostly used for tie-breaking.
➩ Strategic consideration: team \(0\) is the easiest if all students can work together to submit the same test items, but teams \(1\) and \(2\) would benefit from smaller team size which would be easier for coordination.
You should plan your training set and loss function according to the scoring rule.
Your project grade is based on your submission to this assignment (out of 5) plus your ranking in the class (out of 5):
Top 20% gets 5/5.
Next 20% gets 4/5.
Next 20% gets 3/5.
Next 20% gets 2/5.
Next 20% gets 1/5.
(The students who do not participate in the competition will be given scores of negative infinities when computing the rankings).
📗 [1 points] Enter the feature vector of any three training images, one for each shape (three lines, 1024 numbers on each line, comma separated, rounded to 4 decimal places). Remember to divide the pixel color values by 255 so that all feature values are between 0 and 1.
📗 [1 points] Enter a random set of weights (biases in the last row) of your network in the correct format (three matrices separated by -----, each matrix has rows separated by lines, columns separated by commas, the first matrix should be \(1024 + 1\) by \(h_{1}\), second matrix should be \(h_{1} + 1\) by \(h_{2}\), and the last matrix should be \(h_{2} + 1\) by \(3\), all numbers rounded by 4 decimal places).
You can use the button below to check if your network predictions are correct for the three training images you provided.
📗 [5 points] Use the random network from the previous question on the simple test set from the instructions, and output the predictive probabilities (300 lines, 3 numbers in each line, [probability of "sphere", probability of "cube", probability of "tetrahedron"], rounded to 4 decimal places, comma separated).
📗 [5 points] Calculate the score of your predictions if you are in teams 0, 1 and 2 based on the scoring rule in the instruction. Do not include the penalty term for the network size \(m\) (3 numbers, comma separated).
For the following questions, you can use the following tool to generate your training set (or create your own training images by drawing similar shapes: must be 32 pixels by 32 pixels grayscale images; the sizes of the shapes will be fixed at radius 1 for the competition):
Create image: (you can rotate and change the camera angle)
Convert to pixels:
Or randomly rotate and convert (max 1000 at a time, could be slow, wait until this number goes down to 1):
You can also control the noise level (0 to 100): (or you can add noise to the images yourself, i.e. randomly change the color of every pixel with a small probability).
📗 [5 points] Enter the set of weights (biases in the last row) of your network after training on your training set (three matrices separated by -----, each matrix has rows separated by lines, columns separated by commas, the first matrix should be \(1024 + 1\) by \(h_{1}\), second matrix should be \(h_{1} + 1\) by \(h_{2}\), and the last matrix should be \(h_{2} + 1\) by \(3\), all numbers rounded by 4 decimal places).
You can use the button below to check if your network predictions are correct for the three training images you provided.
📗 [15 points] Use the network from the previous question on the simple test set from the instructions, and output the predictive probabilities (300 lines, 3 numbers in each line, [probability of "sphere", probability of "cube", probability of "tetrahedron"], rounded to 4 decimal places, comma separated).
📗 [5 points] Calculate the score of your predictions if you are in teams 0, 1 and 2 based on the scoring rule in the instruction. Do not include the penalty term for the network size \(m\) (3 numbers, comma separated).
📗 [1 points] If you are allowed to pick your team (without considering test items submitted by the other students), which team would you pick? (1 number, 0 or 1 or 2). Note: if you are planning to participate in the competition, you should pick your team first, then create the training set and decide the network architecture, loss function, and training algorithm.
📗 [1 points] Please list the AI tools and references you used and the names of other students and course staff you discussed the assignment or competition with. Please also enter any comments and suggestions including possible mistakes and bugs with the questions and the auto-grading. If you completed the assignment without any help (not recommended), please enter "None" and do not leave this question blank.
📗 Please do not modify the content in the above text field: use the "Grade" button to update.
📗 You could submit multiple times (but please do not submit too often): only the latest submission will be counted.
📗 Please also save the text in the above text box to a file using the button or copy and paste it into a file yourself .
📗 You could load your answers from the text (or txt file) in the text box below using the button . The first two lines should be "##a: 1" and "##id: your id", and the format of the remaining lines should be "##1: your answer to question 1" newline "##2: your answer to question 2", etc. Please make sure that your answers are loaded correctly before submitting them.
📗 Saving and loading may take around 5 to 10 seconds. Please be patient and do not click "Load" multiple times.
📗 Presentations and interviews are optional for the competitions.
📗 If your competition grade is 2, 3, or 4, you can book an interview with the TA for 15 to 30 minutes.
📗 Interviews can only be booked during discussion sessions on Zoom (either during the current discussion session or for a future date and time): Link. Please do not email/spam the TA.
📗 A maximum of 3 interviews can be booked per person, and in the case you need 1 point for the next letter grade, we will allow a 4th one after the final exam.
📗 During the interviews, you will give a 5 to 10 minutes presentation to explain anything you did on the project that is creative or technically challenging. Then you will answer three technical questions about your presentation or any materials related to the assignment.
➩ If you answer any one of the three questions incorrectly, you will get \(-1\).
➩ If you answer all questions correctly, and if your presentation ideas are correct, interesting, consistent with your submissions, and not done by many other students (we will make the decision after all interviews are done), you will get \(+1\).