Skip to content

sor8sh/PureMLP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multilayer Perceptron with NumPy

PureMLP is a minimal, customizable feed-forward neural network implemented using only NumPy. It supports configurable layer sizes, activation functions, forward propagation, backpropagation, and mini-batch training with gradient descent. It also includes a basic testing and visualization function for classification tasks.

Requirements

  • NumPy
  • Pandas
  • Matplotlib

Usage

Initialize the Network

from PureMLP import MLP

model = MLP(layers=[784, 64, 10], activation_functions=['relu', 'softmax'])

Train

model.train(X_train, Y_train, epochs=10, learning_rate=0.01, batch_size=64)

Predict

predictions = model.predict(X_test)

Test with Visualization

model.test(X_sample, true_label)