learning based optimization works on sum loss