How can I get test_value in PyMC(PyMC4)?

Given your question I think @cluhmann 's last post may be the correct approach, but maybe what your asking for is how to evaluate the aesara tensors? Maybe something like this:

import pymc as pm
import aesara.tensor as at

with pm.Model() as model:
    p1 = pm.Uniform("p", 0, 1)
    p2 = 1 - p1
    p = at.stack([p1, p2]) # Vectorize p1 and p2.
    
p.eval()
Out[4]: array([0.212052, 0.787948])

p1.eval()
Out[5]: array(0.212052)

I couldn’t get it quite clear form your last post, but is this what you had in mind?

2 Likes