I would guess the slowdown is probably because theano is recreating the function for evaluation in every iteration of loop. This shouldn’t happen inside your pymc model (where it is compiled only once, together with the rest of the model logp).
I would guess the slowdown is probably because theano is recreating the function for evaluation in every iteration of loop. This shouldn’t happen inside your pymc model (where it is compiled only once, together with the rest of the model logp).