Passing parameters of different lengths to theano op

Hi, I’m trying to vectorize my model. I want to pass a hyperparameter and two vector parameters to the op for a complicated likelihood function. E.g if I have x and y (both length n) and theta (length 1), I get
new_param=tt.stack([x,y])
phi=tt.as_tensor([new_param,theta])
likelihood=pm.DensityDist(‘likelihood’, lambda v: log1([v]), observed={‘v’: phi})

This raises an error: ‘Cannot convert [Join.0, p_fail] to TensorType’, <class ‘list’> on the tt.as_tensor line

My current tt.Op just reads in
phi, = inputs

Any way to make this work?

I think it would be much easier to pass the 3 variables as separate inputs:

likelihood=pm.DensityDist(‘likelihood’, lambda x, y, theta: log1(x)+log1(y)+log1(theta), observed={‘x’: x, 'y':y, 'theta':theta})

I wanted to bump this because I still haven’t found a solution. Even if I try and just pass two vector parameters to a densitydist function, I get:

We expected inputs of types ‘[TensorType(float64, vector)]’ but got types ‘[TensorType(float64, matrix)]’

This is for a hierarchical model, so each of the values in the vector represents that parameter for an individual.

That error is probably something different. Can you post the complete code?