This is because inside the inner loop, the best representation for each negative example must be found.
we need to perform inference for every negative example when updating the weight vector solution.