Merged weight generation into model learning.