简体   繁体   中英

Edward2 implementation of Edward's HMC method

Edward1 contained a method HMC with with the following syntax:

inference = ed.HMC({z: qz})
inference.run()

I'm having difficulty tracking down the migration for this. Neither Edward2 nor TPF contain this package. When looking up the migration instruction on the Edward project's page, the documentation 404s out. The closest implementation in TFP that I have found is:

ed2.mcmc.HamiltonianMonteCarlo()

However this take in params that are significantly different from the Edward1 package. The code example I am working off is linked . There is no updated version of this available in the TFP example repos.

Can anyone explain what the implementation of this method is in Edward2? Has it been entirely replaced/no longer exist?

According to the docs here - https://github.com/google/edward2/blob/master/Upgrading_From_Edward_To_Edward2.md

the HMC available through tensorflow-probability replaces the edward implementation. Details here: https://www.tensorflow.org/probability/api_docs/python/tfp/mcmc/HamiltonianMonteCarlo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM