Coder Social home page Coder Social logo

lxuechen / bdmc Goto Github PK

View Code? Open in Web Editor NEW
51.0 3.0 14.0 3.13 MB

PyTorch implementation of Bidirectional Monte Carlo, Annealed Importance Sampling, and Hamiltonian Monte Carlo.

License: MIT License

Python 100.00%
hamiltonian-monte-carlo bidirectional-monte-carlo pytorch annealed-importance-sampling bayesian-inference mcmc

bdmc's Issues

Error

Traceback (most recent call last):
File "bdmc.py", line 67, in
main()
File "bdmc.py", line 63, in main
bdmc(model, loader, forward_schedule=np.linspace(0., 1., 500), n_sample=100)
File "bdmc.py", line 33, in bdmc
forward_logws = ais_trajectory(model, load, mode='forward', schedule=forward_schedule, n_sample=n_sample)
File "../BDMC/ais.py", line 76, in ais_trajectory
log_int_1 = log_f_i(current_z, batch, t0)
File "../BDMC/ais.py", line 42, in log_f_i
log_likelihood = discretized_logistic(*model.decode(z), data)
TypeError: discretized_logistic() takes 3 positional arguments but 10001 were given

I got this error simply running your code. How can I fix it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.