Crowd counting: Generalized loss function

Generalized loss function for crowd counting.