Deep Learning · MT2 · section
How to solve a mixed numerical without guessing
MT2 numerical practice from direct to mixed
A mixed question is a chain of familiar operations. First circle the requested final quantity. Underline the given activation, loss, padding, stride, threshold, learning rate and any fixed parameters. Draw a small box for each stage. Write the output of one box as the input to the next. Never skip a stage because its title looks unfamiliar.
If the question says output or prediction: do only the forward chain, unless training is separately requested. For a neuron, multiply and add before activating. For a CNN, determine spatial shapes before flattening. For an RNN, carry the previous state into the next time step.
If it says train or update: finish the entire old forward pass, calculate the stated loss derivative, move backward, store every gradient, then update together. If there are several output branches, add their effects at the shared hidden unit. For a batch, follow the stated sum or mean loss before updating.
If it mixes dropout and a loss: apply the given training mask and scaling first; then predict from the resulting activations. The gradient to a dropped path is zero for that mask. If it also specifies L2, add its gradient to the data gradient before the optimizer step. If it also specifies momentum or Adam, carry their stored states as well as the parameter.
If it mixes convolution, pooling and a dense classifier: output shape → next layer input shape → flatten length → dense scores → activation → loss. Count learned parameters separately from output values. Pooling and flattening have zero learned parameters in these questions.
If it changes a familiar problem: an extra input adds another product; an extra output adds another backward path; a new channel adds another kernel sum; a new time step adds another shared-state calculation. The method stays the same. The drills below deliberately change signs, targets, loss scales and layer combinations.
Your completion rule: solve a representative problem today without the answer, repeat it after several hours, then solve a changed-number or mixed version tomorrow. Mark the exact line where your reasoning failed. Correcting that line is what builds reliable recall; reading an open solution does not test it.