Theano error debugging model

@Dominik
Thanks. I’m still a little confused because I set the shape of the RV to a constant, so I don’t understand why it is that evaluation is needed: why isn’t this a theano constant?

Similarly, I didn’t get what input was missing to the Theano shape variable, so that I get the MissingInputError (and it seems hard to winkle that information out of Theano).

If I understand what you’re saying, the shape depends on the actual value of the variable, and that’s why there’s a missing input.

As you might have guessed, this arises when I’m trying to debug a shape error in sampling (even the prior predictive fails), and I’m looking for a general way to diagnose such errors. There is discussion in the Theano docs about how one debugs theano graphs, but it’s not obvious (at least not to me!) how one gets hold of this graph when one is interacting with Theano through PyMC3.