Precomputing all possible A and B values for a single training example.