Should apply below in CustomKernel, This here is NDKernel.
This version of using weights has a normalization by sum(weights)