# yuri-gabriel/neuralnetwork architecture

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

- Interactive diagram: https://gitdiagram.com/yuri-gabriel/neuralnetwork
- Repository: https://github.com/yuri-gabriel/neuralnetwork

## Overview

NeuralNetwork is a small Java application for recognizing handwritten MNIST digits. The documented workflow starts at Main: it loads the datasets, creates a multilayer network, trains it, then evaluates validation images and prints predictions. The README also documents IDX input, pixel normalization, backpropagation, and ASCII output. No source excerpts were provided, so edges reflect only README statements; internal call ownership and the exact roles of individual classes beyond Main remain unverified.

Main entry points: [`src/main/java/com/example/Main.java`](https://github.com/yuri-gabriel/neuralnetwork/blob/master/src/main/java/com/example/Main.java) (Application entry), [`src/main/java/com/example/Treinamento.java`](https://github.com/yuri-gabriel/neuralnetwork/blob/master/src/main/java/com/example/Treinamento.java) (Training and evaluation), [`src/main/java/com/example/Loader.java`](https://github.com/yuri-gabriel/neuralnetwork/blob/master/src/main/java/com/example/Loader.java) (IDX loading), [`src/main/java/com/example/RedeNeural.java`](https://github.com/yuri-gabriel/neuralnetwork/blob/master/src/main/java/com/example/RedeNeural.java) (Multilayer network)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application flow"]
  node_main["Application entry<br/>[Main.java]"]
  node_training["Training and evaluation<br/>[Treinamento.java]"]
end

subgraph group_model["Neural network"]
  node_network["Multilayer network<br/>[RedeNeural.java]"]
end

subgraph group_data["MNIST data"]
  node_loader["IDX loading<br/>[Loader.java]"]
  node_dataset["Dataset representation<br/>[DataSet.java]"]
  node_mnist["MNIST files"]
end

node_user(("User"))

node_user -->|"runs"| node_main
node_main -->|"loads data"| node_loader
node_loader -->|"reads IDX"| node_mnist
node_main -->|"creates"| node_network
node_main -->|"trains and evaluates"| node_training
node_training -->|"trains and tests"| node_network
node_main -->|"prints results"| node_user

click node_main "https://github.com/yuri-gabriel/neuralnetwork/blob/master/src/main/java/com/example/Main.java"
click node_training "https://github.com/yuri-gabriel/neuralnetwork/blob/master/src/main/java/com/example/Treinamento.java"
click node_loader "https://github.com/yuri-gabriel/neuralnetwork/blob/master/src/main/java/com/example/Loader.java"
click node_dataset "https://github.com/yuri-gabriel/neuralnetwork/blob/master/src/main/java/com/example/DataSet.java"
click node_mnist "https://github.com/yuri-gabriel/neuralnetwork/tree/master/src/main/resources/input"
click node_network "https://github.com/yuri-gabriel/neuralnetwork/blob/master/src/main/java/com/example/RedeNeural.java"

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_main,node_training,node_user toneBlue
class node_network toneAmber
class node_loader,node_dataset,node_mnist toneMint
```

## Components

### Application flow

- [Application entry](https://github.com/yuri-gabriel/neuralnetwork/blob/master/src/main/java/com/example/Main.java): `src/main/java/com/example/Main.java`
- [Training and evaluation](https://github.com/yuri-gabriel/neuralnetwork/blob/master/src/main/java/com/example/Treinamento.java): `src/main/java/com/example/Treinamento.java`

### Neural network

- [Multilayer network](https://github.com/yuri-gabriel/neuralnetwork/blob/master/src/main/java/com/example/RedeNeural.java): `src/main/java/com/example/RedeNeural.java`

### MNIST data

- [IDX loading](https://github.com/yuri-gabriel/neuralnetwork/blob/master/src/main/java/com/example/Loader.java): `src/main/java/com/example/Loader.java`
- [Dataset representation](https://github.com/yuri-gabriel/neuralnetwork/blob/master/src/main/java/com/example/DataSet.java): `src/main/java/com/example/DataSet.java`
- [MNIST files](https://github.com/yuri-gabriel/neuralnetwork/tree/master/src/main/resources/input): `src/main/resources/input`

### Other components

- **User**

## Connections

- User → Application entry: runs (evidence: `README.md`)
- Application entry → IDX loading: loads data (evidence: `README.md`)
- IDX loading → MNIST files: reads IDX (evidence: `README.md`)
- Application entry → Multilayer network: creates (evidence: `README.md`)
- Application entry → Training and evaluation: trains and evaluates (evidence: `README.md`)
- Training and evaluation → Multilayer network: trains and tests (evidence: `README.md`)
- Application entry → User: prints results (evidence: `README.md`)
