diff --git a/README.md b/README.md index 051deb1..3b189f9 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ [![CI](https://github.com/minitorch/minitorch/workflows/CI/badge.svg)](https://github.com/minitorch/minitorch/actions) -* Docs: https://minitorch.github.io/ +* Docs: https://minitorch.github.io -* Overview: https://minitorch.github.io/module4.html +* Overview: https://minitorch.github.io/module4/module4/ Module 4 extends MiniTorch with convolutional neural network operations to build an image recognition system. You'll implement a version of LeNet on MNIST for digit recognition and 1D convolution for NLP sentiment classification: @@ -82,58 +82,8 @@ pre-commit run --all-files - Train a model on Digit classification (MNIST), add logs as `mnist.txt` showing train loss and validation accuracy - Implement Conv1D, Conv2D, and Network classes for both training files -## Testing - -**Module 4 Tasks:** -```bash -pytest -m task4_1 # 1D convolution -pytest -m task4_2 # 2D convolution -pytest -m task4_3 # Pooling operations -pytest -m task4_4 # Advanced NN functions -``` - -**CNN Training:** -```bash -python project/run_mnist_multiclass.py # MNIST digit classification -python project/run_sentiment.py # SST2 sentiment analysis -``` - -**Style Checks:** -```bash -pre-commit run --all-files -ruff check . && pyright -``` - -## CNN Applications - -**MNIST digit classification with CNNs:** -- Convolutional feature extraction -- Spatial pooling for dimension reduction -- Performance comparison with fully-connected networks - -**Expected improvements over fully-connected:** -- Fewer parameters through weight sharing -- Translation invariance for image recognition -- Hierarchical feature learning - -## Module Requirements - -This module requires files from previous assignments, so make sure to pull them over to your new repo. We recommend getting familiar with `tensor.py`, since you might find some of those functions useful for implementing this module. - -Get the required files by running: - -```bash -python sync_previous_module.py -``` - -**Required files from Module 3:** -- All tensor system files and fast operations -- Module framework and autodifferentiation -- Training scripts and datasets ## Resources - **[Installation Guide](installation.md)**: Setup instructions with MNIST -- **[Testing Guide](testing.md)**: CNN testing strategies -- **MiniTorch Docs**: https://minitorch.github.io/ -- **Module 4 Overview**: https://minitorch.github.io/module4.html \ No newline at end of file +- **[Testing Guide](testing.md)**: CNN testing strategies \ No newline at end of file diff --git a/installation.md b/installation.md index b7058ad..7eb307d 100644 --- a/installation.md +++ b/installation.md @@ -1,11 +1,16 @@ # MiniTorch Module 4 Installation -MiniTorch requires Python 3.8 or higher. To check your version of Python, run: +MiniTorch requires Python 3.11. To check your version of Python, run: ```bash >>> python --version ``` +If you don't have Python 3.11, install it before proceeding: +- **Mac**: `brew install python@3.11` +- **Ubuntu/Debian**: `sudo apt install python3.11` +- **Windows**: Download from python.org + We recommend creating a global MiniTorch workspace directory that you will use for all modules: @@ -19,14 +24,14 @@ We highly recommend setting up a *virtual environment*. The virtual environment **Option 1: Anaconda (Recommended)** ```bash ->>> conda create --name minitorch python # Run only once +>>> conda create --name minitorch python=3.11 # Run only once >>> conda activate minitorch ->>> conda install llvmlite # For optimization +>>> conda install llvmlite # For optimization ``` **Option 2: Venv** ```bash ->>> python -m venv venv # Run only once +>>> python3.11 -m venv venv # Run only once (requires Python 3.11) >>> source venv/bin/activate ``` diff --git a/pyproject.toml b/pyproject.toml index 8782b20..b15dc64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,11 +6,11 @@ build-backend = "hatchling.build" name = "minitorch" version = "0.5" description = "A minimal deep learning library for educational purposes" -requires-python = ">=3.8" +requires-python = ">=3.8,<3.12" dependencies = [ "colorama==0.4.6", "hypothesis==6.138.2", - "numba>=0.61.2", + "numba>=0.61.2", "numpy<2.0", "pytest==8.4.1", "pytest-env==1.1.5",