bayesian-torch icon indicating copy to clipboard operation
bayesian-torch copied to clipboard

There are questions about function fitting (variational Bayesian network)

Open dashangyanhua opened this issue 1 year ago • 2 comments

Thank you for providing a powerful Bayesian-torch library! I am currently learning about this and now I have a problem. I want to fit a distribution using a variational Bayesian network, but I don't know how to use it. Is our Bayesian-torch library mainly for converting DNNs to BNNs, and cannot design a pure BNN network?

dashangyanhua avatar Nov 14 '24 08:11 dashangyanhua

@dashangyanhua Bayesian-Torch can be used to create BNNs utilizing the Bayesian layers from the repo. Here is a simple example to create the model with variational Bayesian layers - https://github.com/IntelLabs/bayesian-torch/blob/main/bayesian_torch/models/bayesian/simple_cnn_variational.py

ranganathkrishnan avatar Nov 14 '24 08:11 ranganathkrishnan

Bayesian-Torch 可用于利用 repo 中的贝叶斯层创建 BNN。这是一个创建具有变分贝叶斯层 - https://github.com/IntelLabs/bayesian-torch/blob/main/bayesian_torch/models/bayesian/simple_cnn_variational.py 的模型的简单示例

Thank you very much for your quick reply! I'm not sure if I understand what you mean or not. Frist I need a model which can be implemented through MLP/CNN to fit a function. And then we implement the DNN-BNN structure via bayesian_torch. If my function is a probability distribution, such as a broad Rosenbrock's banana function by using log-likelihood function by Variational Bayesian to fit it, I'm not sure if this is could work by DNN.

dashangyanhua avatar Nov 14 '24 08:11 dashangyanhua