Skip to content

Yanis1m/programmation-diff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MLP

MLP implementation from scratch with scalar autograd, trained on the Iris dataset.

Run

pip install -r requirements.txt
  • Open mlp_iris.ipynb and run all cells from the repo root so mlp_lib is on the path.

Project Structure

  • mlp_lib/: minimal autograd + MLP implementation
    • tensor.py: scalar Tensor with backward pass
    • mlp.py: Neuron/Layer/MLP
    • loss.py: stable log-sum-exp cross-entropy on logits
    • optimizer.py: Adam optimizer
  • mlp_iris.ipynb: training + evaluation notebook
  • training_curves.png, confusion_matrix.png: sample outputs

Model

  • Input: 4 features (Iris)
  • Hidden 1: 16 neurons, tanh
  • Hidden 2: 8 neurons, tanh
  • Output: 3 logits (softmax handled in the loss)

Data

  • StandardScaler is fit on the training split and applied to both train and test.

Results

~95-100% accuracy on the test set after 100 epochs.

Authors

  • Marc GUILLEMOT
  • Emre ULUSOY
  • Rayan DRISSI
  • Yanis MARTIN

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors