MLP implementation from scratch with scalar autograd, trained on the Iris dataset.
pip install -r requirements.txt- Open
mlp_iris.ipynband run all cells from the repo root somlp_libis on the path.
mlp_lib/: minimal autograd + MLP implementationtensor.py: scalar Tensor with backward passmlp.py: Neuron/Layer/MLPloss.py: stable log-sum-exp cross-entropy on logitsoptimizer.py: Adam optimizer
mlp_iris.ipynb: training + evaluation notebooktraining_curves.png,confusion_matrix.png: sample outputs
- Input: 4 features (Iris)
- Hidden 1: 16 neurons, tanh
- Hidden 2: 8 neurons, tanh
- Output: 3 logits (softmax handled in the loss)
StandardScaleris fit on the training split and applied to both train and test.
~95-100% accuracy on the test set after 100 epochs.
- Marc GUILLEMOT
- Emre ULUSOY
- Rayan DRISSI
- Yanis MARTIN