How to resolve Input Dimension Mis-match Error in Hierarchical Bayesian Inference with PyMC3

First, I suggest you use the latest PyMC (not the quite old PyMC3). It uses pytensor instead of theano, which is still actively maintained by the PyMC developers.

Second, I suggest you print variable.eval().shape in a couple of places to see if the shapes you are getting are what you expect. Theano/PyTensor uses the same rules as Numpy when it comes to shape handling and broadcasting.

1 Like