caculate the derivates of target functor w.r.t nm params