The objective of this assignment is to develop a
multi-layer neural network model from scratch.
Instructions:
Setup: Begin by downloading the
Kamangar_01.zip file and unzipping it
on your computer.
Model Overview: The neural network model for this
assignment is composed of multiple layers of neurons, with several
nodes in each layer. The activation (transfer) function for all the
nodes will be a sigmoid function.
Weights: Your model’s weights should include
biases, which are represented in the first column of your weight
matrices.
Vectorization: Ensure that your code is fully vectorized
using NumPy. You areNOTallowed to use
any external libraries or packages, except for
NumPy.
Training: Implement the model to update weights after
processing each sample (i.e., using a batch size of
1).
Function Constraints: YouMUST
NOTchange the name of the primary function
(multi_layer_nn) or its parameters. However, you are allowed to add
any additional (helper) functions as needed. All helper functions
must be included in the same file as the multi_layer_nn()
function.
Comments &
Documentation: Comments in the multi_layer_nn() function
provide further guidance to help with your implementation. Follow
these comments closely to ensure that your implementation is
aligned with the requirements.
Testing: A minimal set of unit tests is provided in
the Assignment_01_tests.py file to check the functionality of your
multi_layer_nn.py. Your grade will depend on passing these tests,
as well as additional tests that may be used during grading. Feel
free to modify or extend the Assignment_01_tests.py file to include
more tests for development purposes.
DO NOTsubmit the test file when submitting your
Assignment_01
DO NOT submit the python environment files (if you used
an environment for your project)
Running Tests: To run the tests, use the following
command:
py.test --verbose
Assignment_01_tests.py
The following is roughly what your output should
look like if all tests pass