How to obtain prediction results

Hello, Thank you for this community. I am a beginner and I have a very dumb question on using Edward. I am using a tutorial regression model. Everything is perfect. I was wondering how to obtain the prediction on testing set. for example, assuming

y = Normal(loc=neural_network(X), scale=0.1 * tf.ones(M), name="y")

How can I got y by giving testing set? I tried: y.eval(feed_dict={X: x_valid}). but the mean absolute error results seems not matched: the MAE using ed.evaluate('mean_absolute_error', data={X: x_valid, y_post: y_valid}) is roughly 0.074, while the MAE from y.eval and y_valid is roughly 0.11.

I also tried sess.run(y, feed_dict={X: x_valid}), which is also not working.

Thank you!

I found that in edward, instead of using sess=tf.Session, you need to use sess=ed.get_session(). I finally got correct results by running sess.run(y_post.mean, feed_dict={X:x_valid}). I suggest add this tiny issue into the tutorial

Thanks for solving the issue and reporting back. Any pull requests making specific revisions to the tutorial’s texts are welcome.