My code is:
h = pm.Normal("h", mu=0.0, sigma=0.1)
a = pm.Normal("a", mu=mu_a, sigma=tau_a, dims="h")
d = pm.Normal("d", mu=mu_d, sigma=tau_d, dims="a")
theta_1 = math.exp(h + a + d)
error:
---> 14 theta_1 = math.exp(a + d)
TypeError: must be real number, not TensorVariable
Unforunately python's builtin
mathlibrary doesn't supporttheanotensors. So you need to follow https://discourse.pymc.io/t/error-in-basic-model-due-to-trigonometric-functions-using-math-library/2825/2 in usingpymc3.math....ortheano.tensor(for example).I am having the same problem in needing to pymc3-ize a custom function.
HTH