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

@ricardoV94 Thanks a ton! This looks promising. For record, I have opened a new post here with explanation of my problem: Problem with dynamically generating random variables in a Compound Poisson model