結果 : compute gradient of loss function python