AI Hardware & Software Stack
What is the difference between training and inference for a neural network?
- ATraining repeats forward passes, backpropagation and weight updates to determine weights; inference only runs forward passes with fixed weights to produce answers
- BBoth training and inference perform only forward passes
- CInference updates weights, and training uses no weights
Show answer and explanation
Answer: A. Training repeats forward passes, backpropagation and weight updates to determine weights; inference only runs forward passes with fixed weights to produce answers
Training computes outputs from inputs (the forward pass), propagates the error against the correct answer backward from output to input to obtain each weight's gradient (backpropagation), and adjusts the weights slightly according to the gradients, repeating this over large amounts of data. Inference uses the learned weights and runs only the forward pass. Backpropagation needs about twice the computation of the forward pass and intermediate results must be stored, so training is far heavier than inference.
- A. Correct. Training needs far more computation and memory.
- B. Training also performs backpropagation and weight updates.
- C. It is the other way around.