d46712ff53a84a1cf5466f502a9a65dd78baf8c5
Toy ML models and experiments
This repo contains some experiments with ML I am working on to learn how they work.
Setup
Debian 13 (Trixie) Python3 setup
$ sudo apt install python3-full python3-venv
python3-full is already the newest version (3.13.5-1).
python3-venv is already the newest version (3.13.5-1).
Get the code and init the venv
git clone http://the.git.repo/user/mltoys.git mltoys && cd mltoys
python3 -m venv .venv
source .venv/bin/activate
Installing python deps
For instructions installing pytorch refer to the PyTorch Home page
pip3 install numpy pandas matplotlib
# I use the ROCm packages
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/rocm6.4
# if you need the CPU only package
# pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
Running the code
Training the model
(.venv) ➜ python3 pairwise_compare.py train
Running inference
(.venv) ➜ python3 pairwise_compare.py infer
Some General notes
- This module logs to pairwise_compare.log using the python logging module
- Saved model state (training data) is saved at model.pth
- output_graphs.py generates two graphs to inspect the training process, copy the step log into the script to generate graphs.
Description
Languages
Python
100%