calculate p(D|M) for Turing tutorial model?

#1

Hi folks,
I am new to Julia, Turing, and Bayes, so I’m a bit out of my depth here. I think I have a rough handle on what Turing is doing in the third tutorial (http://turing.ml/tutorials/3-bayesnn/), which is close to my intended use. I would like to calculate the likelihood of the example string y, given the model with its unconditioned priors, and again after parameter optimisation, so as to see the model’s predictive power improving. I can’t figure out how I would go about getting the likelihood of a particular observation out of a Turing model, though. I think it has something to do with “observe”, but I don’t know what, and I’m not sure how to invoke it separately from “assume” with ~. Can anyone point me in the right direction?

Thanks!
Mike