# NOT RUN {
# Simulate from a Normal Distribution with uninformative, improper prior
dataset = list("x" = rnorm(1000))
params = list("theta" = 0)
logLik = function(params, dataset) {
distn = tf$distributions$Normal(params$theta, 1)
return(tf$reduce_sum(distn$log_prob(dataset$x)))
}
stepsize = list("theta" = 1e-5)
output = sghmc(logLik, dataset, params, stepsize)
# For more examples see vignettes
# }
Run the code above in your browser using DataLab