Neural networks practice problems

18 problems · 0 solved

A neural network is a stack of simple layers, each doing a matrix multiply followed by a nonlinearity. Training adjusts the weights so the output gets closer to the target, using gradients computed by backpropagation. These problems build that understanding from the ground up without any deep learning library. You will count the parameters of an MLP, compute Xavier and He initialisation scales, write the backward pass of a dense layer, implement inverted dropout, backpropagate through an embedding lookup, write the forward pass of a pre-norm residual MLP block and backpropagate through it, find where early stopping halts, train a tiny MLP to learn XOR, and backprop a two-layer ReLU network with softmax cross-entropy, ignored labels and weight decay. Start with the Easy problems on parameter counts, initialisation and dense layer backward. Then do dropout, embeddings and the residual forward pass, and finish with the full two-layer backprop and XOR training. Writing a network by hand is a common interview task, and it gives you the intuition to spot exploding gradients, bad initialisation or overfitting in real training runs.

Easy 8

Medium 7

Hard 3

Related topics

All practice problems