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

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?