# justinnitoi/digit_neural_net architecture

> Architecture diagram of the GitHub repository justinnitoi/digit_neural_net, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/justinnitoi/digit_neural_net
- Repository: https://github.com/justinnitoi/digit_neural_net

## Overview

This small Python program loads and preprocesses MNIST, trains a 784–20–10 sigmoid network with per-example backpropagation, and prints epoch accuracy. The excerpts show the loader, dataset access, and training/reporting logic; the user-triggered entry point is not documented, so that relationship is marked unverified.

Main entry points: [`nn.py`](https://github.com/justinnitoi/digit_neural_net/blob/main/nn.py) (Train Network), [`data.py`](https://github.com/justinnitoi/digit_neural_net/blob/main/data.py) (Load MNIST), [`data/mnist.npz`](https://github.com/justinnitoi/digit_neural_net/blob/main/data/mnist.npz) (MNIST Archive)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["MNIST Data"]
  node_loader["Load MNIST<br/>[data.py]"]
  node_dataset["MNIST Archive<br/>[mnist.npz]"]
end

subgraph group_runtime["Network Runtime"]
  node_trainer["Train Network<br/>[nn.py]"]
  node_accuracy["Epoch Accuracy<br/>[nn.py]"]
end

node_user(("User"))

node_user -.->|"runs"| node_trainer
node_trainer -->|"loads data"| node_loader
node_loader -->|"reads"| node_dataset
node_trainer -->|"prints"| node_accuracy

click node_trainer "https://github.com/justinnitoi/digit_neural_net/blob/main/nn.py"
click node_loader "https://github.com/justinnitoi/digit_neural_net/blob/main/data.py"
click node_dataset "https://github.com/justinnitoi/digit_neural_net/blob/main/data/mnist.npz"
click node_accuracy "https://github.com/justinnitoi/digit_neural_net/blob/main/nn.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_loader,node_dataset,node_user toneBlue
class node_trainer,node_accuracy toneAmber
```

## Components

### MNIST Data

- [Load MNIST](https://github.com/justinnitoi/digit_neural_net/blob/main/data.py): `data.py`
- [MNIST Archive](https://github.com/justinnitoi/digit_neural_net/blob/main/data/mnist.npz): `data/mnist.npz`

### Network Runtime

- [Train Network](https://github.com/justinnitoi/digit_neural_net/blob/main/nn.py): `nn.py`
- [Epoch Accuracy](https://github.com/justinnitoi/digit_neural_net/blob/main/nn.py): `nn.py`

### Other components

- **User**

## Connections

- User → Train Network: runs
- Train Network → Load MNIST: loads data (evidence: `nn.py`)
- Load MNIST → MNIST Archive: reads (evidence: `data.py`)
- Train Network → Epoch Accuracy: prints (evidence: `nn.py`)
