XOR Neural Lab

XOR Neural Network Lab

छोटे multilayer perceptron के लिए forward/backward pass visualization।

XOR को एक single linear separator से हल नहीं किया जा सकता। मॉडल को nonlinear decision surface सीखनी होती है।

इसलिए XOR hidden layers और nonlinear activations दिखाने का standard toy problem है।

सिमुलेटर एक compact MLP उपयोग करता है:

Input(2) -> Hidden(4) -> Hidden(2) -> Output(1)

Output activation sigmoid है ताकि binary probability मिले। Hidden activation tanh या ReLU हो सकता है।

हर step एक XOR केस sample करता है, forward pass करता है, loss निकालता है, फिर backprop updates लगाता है।

$$ z^{(l)} = a^{(l-1)}W^{(l)} + b^{(l)}, \quad a^{(l)} = f(z^{(l)}) $$

$$ W \leftarrow W - \eta \nabla_W L, \quad b \leftarrow b - \eta \nabla_b L $$

  • Loss chart training steps पर convergence trend दिखाता है।
  • Prediction panel चारों XOR inputs के लिए output confidence दिखाता है।
  • Calculation panel latest forward/backward values log करता है।

Training Controls

Step: 0 | Loss: -

Forward/Backward Trace


            

Prediction Snapshot

बड़े circles output probability ज्यादा होने का संकेत हैं।

XOR Targets

  • (0,0) -> 0
  • (0,1) -> 1
  • (1,0) -> 1
  • (1,1) -> 0