2025-12-25 14:54:08 +00:00
2025-12-19 09:13:07 -05:00
2025-12-25 14:54:08 +00:00
2025-12-20 01:59:50 +00:00

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
A collection of ML experiments I am playing with.
Readme 98 KiB
Languages
Python 100%