Pyro plate inquiry

Im using pyro.plate.
And have an inquiry about assigning values

        with pyro.plate("betas", 5):
            loc = pyro.param("loc", torch.tensor(0.))
            scales = pyro.param("scales", torch.tensor(1.))
            betas = pyro.sample("beta", dist.Normal(locs, scales))

If I do this, then I have 5 betas. But all of betas are from “the same” distribution which is N(0,1).

What should I do if I were to give 5 betas each different distribution parameter?
I tried for loop to do this. But it is too slow I think

Is there any recommended way for this?

Hi, you can do this by simply making loc and scales into 5-dimensional vectors:

loc = torch.tensor([0.1, 0.2, 0.3, 0.4, 0.5])

Thank you!!