As a result, existing implementations of GloVe use an inner loop to compute this cost and associated derivatives.
since f (0) = 0, the second bracket is irrelevant whenever X ij = 0, and so replacing log X ij with  (for any k) does not affect the objective and reveals that the cost function can be readily vectorized as where M = W W + b1 + 1b − g(X).