# Gradient of a convex loss for linear classifiers

Let L(w; x; y) be a convex loss function for a linear classifier w. Can you always express the gradient of L w.r.t w as f(y; wx)*x? I.e, is the gradient always some scalar function f of the gold label y and the prediction wx, times x? This seems to hold for hinge loss, square loss and logistic loss.