AdamCobb / hamiltorch

PyTorch-based library for Riemannian Manifold Hamiltonian Monte Carlo (RMHMC) and inference in Bayesian neural networks
BSD 2-Clause "Simplified" License
426 stars 63 forks source link

Number of steps per sample with No-U-Turn Sampler #9

Closed LukasWFurtner closed 4 years ago

LukasWFurtner commented 4 years ago

Hi,

I have a question regarding the No-U-Turn Sampler. In the code I cannot find where the number of steps per sample is determined automatically. Does the number of steps per sample remain a hyperparameter even though NUTS is used?

Best regards Lukas

AdamCobb commented 4 years ago

Hi Lukas,

Sorry for the delay in responding. I was trying to update the repo a bit recently.

Thanks very much for pointing this out. For the time being the version of NUTS in hamiltorch only adapts the step size and not the trajectory length. This is something that I ought to change.

For now, I changed the Readme to make it clear that the step size is the only part being adapted.

All the best and thanks for taking an interest!

Adam

ahenkes1 commented 1 year ago

Hi Adam, is there any hope, that the automatic trajectory length feature will be implemented? Best, Alex

AdamCobb commented 1 year ago

Hi Alex,

I do have a version of NUTS implemented but I need to check it works properly and clean the code up before adding it to the public repo.

Thanks for your interest!

Adam