This project implements and evaluates multilayer perceptrons (MLPs) from scratch using Python and NumPy. It includes code for training on toy datasets such as XOR, as well as comparison with a log-linear model.
- Python 3.x
- NumPy
You can install the dependencies using:
pip install -r requirements.txtTo train the MLP on provided data:
python train_mlp1.pyTo compare with the log-linear model:
python train_loglin.pyTo test MLP learning on XOR:
python xor_data.py
python train_mlp1.py --data xorEnsure your gradients are implemented correctly:
python grad_check.pyModel predictions are saved in test.pred. You can evaluate using provided scripts or compare with ground truth labels in the test folder.
- All models are implemented from scratch using NumPy, with no deep learning frameworks used.
