This code implements a simple neural network with one hidden layer to solve the XOR (exclusive OR) problem. The XOR problem is a classic problem in machine learning where the task is to learn a mapping from input pairs (0, 0), (0, 1), (1, 0), and (1, 1) to their corresponding outputs (0, 1, 1, 0). The network uses a sigmoid activation function and gradient descent for training.
Input Layer: 2 neurons (N_INPUTS) Hidden Layer: 3 neurons (N_HIDDEN) Output Layer: 1 neuron (N_OUTPUTS)