Thanks for your reply!
My underlying question is, can I use this tool to do pure maximum likelihood?
I can get it to work sometimes but not always. I came up with a simpler example of just finding the mean and sd of a univariate gaussian. Here is the code:
mu_true = 5
sd_true = 2
N = 100
xtrain = np.random.normal(mu_true,sd_true,size=N)
#edward model
s = tf.Variable(1.0)
m = tf.Variable(0.0)
x = Normal(mu=m*tf.ones(N),sigma=s*tf.ones(N))
mle = ed.Inference({},{x:xtrain})
mle.run()
sess = ed.get_session()
sess.run(m)
expected result: $m\approx 5$. Observed result: $m=0.0$.
If I put a prior on m and do MAP I can get the result out from the qm approximating PointMass distribution with no issue. Also interestingly, if I put a prior on m, I can get the correct point estimate for “s” using sess.run(s) as expected, but if I don’t put a prior on m, I get the initialized (incorrect) point estimate.