Implementation of neural networks built from scratch in pure Python — no high-level frameworks. A hands-on exploration of deep learning fundamentals.
This project implements neural networks without TensorFlow or PyTorch — using only Python and NumPy. The goal is to build a deep understanding of how neural networks actually work under the hood by implementing every component manually: forward propagation, backpropagation, weight updates, and evaluation.
The project is organized into sequential phases, each represented by a directory:
Coletas/ # 1. Data collection and loading
Pré-processamentos/ # 2. Normalization, encoding, train/test split
Modelagem/ # 3. Network architecture, forward/backprop, gradient descent
Avaliação/ # 4. Accuracy, loss curves, confusion matrix
interface/ # 5. Simple visualization interface
- Forward Propagation — layer-by-layer computation of activations
- Activation Functions — Sigmoid, ReLU, Softmax (manual implementation)
- Loss Functions — Mean Squared Error, Cross-Entropy Loss
- Backpropagation — gradient computation via chain rule
- Gradient Descent — weight and bias updates (SGD)
- Data Preprocessing — normalization, one-hot encoding
- Model Evaluation — accuracy, loss tracking per epoch
pip install -r requirements.txtCore dependencies: numpy, matplotlib, pandas
git clone https://github.com/walicard56/IA_redes.git
cd IA_redes
pip install -r requirements.txtNavigate to each phase directory in order:
# Step 1 — Load your dataset
cd Coletas && python collect.py
# Step 2 — Preprocess the data
cd ../Pré-processamentos && python preprocess.py
# Step 3 — Train the network
cd ../Modelagem && python model.py
# Step 4 — Evaluate results
cd ../Avaliação && python evaluate.pyimport numpy as np
def sigmoid(z):
return 1 / (1 + np.exp(-z))
def forward(X, weights, biases):
Z = np.dot(weights, X) + biases
A = sigmoid(Z)
return A
# Single layer pass
X = np.array([[0.5], [0.8]])
W = np.random.randn(3, 2)
b = np.zeros((3, 1))
output = forward(X, W, b)
print(output)"What I cannot create, I do not understand." — Richard Feynman
Using high-level frameworks hides the math. Building from scratch forces you to truly understand:
- Why learning rate matters
- How gradients flow backwards through layers
- What happens when weights are initialized poorly