Table of Contents

Assignment: Neural Network

📅 Deadline: 11.12.2024 21:59

🏦 Points: 8

Note: If you downloaded the template before November 7th at 11:50, please download the updated version. The previous version erroneously evaluated the Softmax layer instead of the Cross-entropy tests. In the case that you find any mistakes, please contact Jakub Paplhám at paplhjak@fel.cvut.cz

Task Description

In this assignment, you are tasked with implementing the forward, backward, and parameter messages required for training of a simple neural network. You can find the complete description of the assignment in the Assignment PDF.

You are provided with a template containing the following files that you do not need to modify:

The template also includes the following files which you do need to modify:

Your objective is to implement the forward, backward, and parameter messages in the previously mentioned files. You can find them by searching for “TODO” in the python files.

All python files must be stored in the root of the .zip sent for submission.

How to Test

After completing your implementation, you can test your solution using the following commands before submitting it to BRUTE:


Public Test Cases

You can validate your code by running:

python main.py test-cases/public/instances/instance_1.json
python main.py test-cases/public/instances/instance_2.json
python main.py test-cases/public/instances/instance_3.json

For all of these instances, the expected output is:

Linear:
  forward: Test OK
  delta: Test OK
  grad_W: Test OK
  grad_b: Test OK
ReLU:
  forward: Test OK
  delta: Test OK
Softmax:
  forward: Test OK
  delta: Test OK
Cross Entropy:
  forward: Test OK
  delta: Test OK
Cross Entropy For Softmax Logits:
  forward: Test OK
  delta: Test OK
MLP:
  Linear_3 gradient: Test OK
  Linear_2 gradient: Test OK
  Linear_1 gradient: Test OK

Submission Guidelines