How can I use a theano tensor variable as a shape value

I use SBM to model network data,a IBP(indian buffet process)is used as a prior for community assignment matrix, and I want the number of communities K can be studied from data instead of predefined. When I use PyMC3 to describe my model,an error ocurred, I can’t use a theano tensor variable as a shape value

%E5%9B%BE%E7%89%87

Dynamic shape or using tensor to define shape is not possible currently. I think some of the pymc3 devs explored similar idea but none successful. @bwengals @aseyboldt?

It seems that edward support this,I’m trying.Thank you