Normalize samples to unit length when setting weights.