Using pm.DensityDist and customized likelihood with a black-box function

Ok, thanks! So in that case, should I write an extension of the theano.op class and place my gradient computation in the grad() method?