Yea, this isn’t surprising. It’s also weird thinking mathematically about finding the root of a function of random variables, so in that case I’d have to sample points just like in the optimizer through a search algorithm.
And that’s exactly why I’ve already explained the reasons for the problem in the topic, looking for some suggestion to deal with it.
And yes again, I need an optimization for every MCMC iteration. It’s an inverse problem of uncertainty quantification, where I can usually isolate the necessary variables algebraically, but not this time.
What did I do in that time interval? Well I found this decorator method theano.compile.ops.as_op and passed to my function that propagates the randomness
@as_op(itypes=[tt.dscalar,tt.dscalar,tt.dscalar,tt.dscalar,tt.dscalar,tt.dscalar,tt.dscalar], otypes=[tt.dvector])
The result is strange but seems to have worked around the problem somehow. I don’t know if it is the best solution.