From fa2bfe4ef51912ccf4e30ba45183c575516fcf4f Mon Sep 17 00:00:00 2001 From: Lenoctambule <106790775+lenoctambule@users.noreply.github.com> Date: Fri, 27 Mar 2026 09:05:01 +0100 Subject: [PATCH] feat: README.md w/ usage, training and inference instructions --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..edbd77e --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +# Python AutoEncoder from scratch using Numpy + +## Usage + +1. Install requirements : +```sh +$ pip install -r requirements.txt +``` + +2. Optionally run mnist_test.py. +```sh +$ py mnist_test.py +``` + +## Training + +Instatiate an `Autoencoder` object : +```py +from autoencoder import Autoencoder + +autoencoder = Autoencoder(in_len=300, bottleneck=50, 0.001, relu) +``` +And then via the `train_dataset` method to train over a dataset : +```py +autoencoder.train_dataset(data) +``` +Or via the `train` to input each data points iteratively : +```py +autoencoder.train(v) +``` + +## Inference + +Use your `Autoencoder` object with the `encode` and `decode` methods like so : +```py +example = ... +code = autoencoder.encode(example) +output = autoencoder.decode(code) +```