← Pinterest Interview Insights
I spent the first few minutes just confirming the architecture because I've been burned before assuming things.
Start by clearly stating the architecture and the given parameters, then systematically compute the pre-activation (z) and post-activation (a) for each layer using the sigmoid function. Show all arithmetic steps and keep track of intermediate values to avoid errors, and finally verify the output shape and range.
Pro tip: While computing, mention that sigmoid outputs are always between 0 and 1, and note that for large negative or positive inputs, the sigmoid saturates, which can cause vanishing gradients—this shows awareness of practical implications.
Identify the number of layers, neurons per layer, and the activation function (sigmoid). Write down the weight matrices and bias vectors for each layer.
For each neuron in the first hidden layer, compute z = W·x + b, where x is the input vector. Show the dot product and addition explicitly.
Compute a = σ(z) = 1/(1+e^{-z}) for each pre-activation. Round to a reasonable number of decimal places (e.g., 4) for clarity.
Repeat steps 2 and 3 for each hidden layer, using the previous layer's activations as input. For the output layer, compute pre-activations and apply sigmoid if required.
List all intermediate pre-activations and post-activations in a table. Check that outputs are in (0,1) and that dimensions match expectations.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.