This is an implementation of the SVM classifier on the MNIST dataset
Use this resource for a brief introduction
Use this resource for implementation details in matlab
This implementation is developed in python 3.9.15 Setup your python environment by following the instructions
- Change to the project directory. (the next commands require you to be here)
- run
virtualenv env --python=<path to python 3.9 executable>
- run
source ./env/bin/activate
- run the bash script
pip_installs
or follow the last 2 steps. (they do the same thing) - run
pip install -r requirements.txt
- run
pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu116
- change to the project directory. (the env.yml file is in the project root)
- run
conda env create -f env.yml
Using the environment built from the instructions above, start your jupyter notebook server by calling
jupyter notebook
in the project root.
Then you can follow the jupyter notebook svm_example.ipynb
to train a model, generate graphs from training, and then visualize the weights of the model