@ckrapu the basic idea of your code is correct. I was a vector in my code, but I’m sure you meant len(I) as nrepeats, so I should’ve caught that. So I think the following works:
gamma = gamma_gp.prior(f"gamma_{i}", X=W)
gamma_iw = tt.repeat(gamma[:, None], len(I), axis=1)
But one small point: gamma_iw is a (W, I) matrix because I set axis=1. If axis=0, I get a (I*W, 1) matrix. axis=0 does not quite do what you expected from the repeats operation? I might just have to transpose, which isn’t an issue.