Confused about building a compound distribution hierarchical Bayes model with continuous and categorical inputs in pymc3

In pymc3, distributions cannot infer their shape from their parameters. You need to explicitly provide the shapes of Nand X.