Implement own MCMC Kernel

Hi there!

Does anyone know how can I implement my own MCMC kernel. Specifically I want to sample from the posterior distribution of a BNN but I want to use my own sampler. In the documentation it says that the kernel has to be an instance of the TraceKernel class. However, I cannot find any information of the requirements such class must have in order to implement mine. Does anyone have any idea on how can I do this? I thought of using the code for HMC or NUTS as a guide, given that it should imitate the workflow of any of those, but I am still unsure about what exactly I can modify or not.

Thanks in advance!

1 Like

i believe the class you want to inherit from is MCMCKernel

1 Like