Neural Networks · Beginner

Neural Network / MLP

Build the layers yourself, then watch real forward pass, loss, backpropagation, weights, and decision boundaries change.

ModelOrigen's Neural Network Playground is inspired by the interaction pattern of TensorFlow Playground while using ModelOrigen's own browser-side educational MLP implementation. Students can change datasets, hidden layers, neurons, activation, learning rate, batch size, noise, train/test ratio, and L1/L2 regularization.

Step by step

  1. Choose XOR, circles, Gaussian clusters, or spiral data.
  2. Add or remove up to six small hidden layers and change neurons in each layer.
  3. Calculate every dense layer z = Wa + b and its activation.
  4. Produce a sigmoid probability and binary cross-entropy loss.
  5. Backpropagate genuine gradients through every configured layer.
  6. Apply mini-batch SGD with optional L1/L2 regularization.
  7. Replay actual checkpoints while weights and the real decision boundary change.

Core formulas

Dense layer

z^[l] = W^[l]a^[l−1] + b^[l]

Each configured layer combines the previous activations using trainable weights and biases.

Binary cross-entropy

L = −[y log p + (1−y)log(1−p)]

The loss measures how wrong the current probability is.

Backprop update

W ← W − η·∂L/∂W

Every visible update comes from the calculated gradient.

When to use Neural Network / MLP

  • Learning neural-network foundations and backpropagation.
  • Testing why hidden layers can model nonlinear boundaries such as XOR.

Official documentation

TensorFlow Playground

TensorFlow basic classification

scikit-learn MLP guide