Bean Machine概率模型推斷庫
Bean Machine 是一種概率編程語言,用于使用聲明性語法對用 Python 語言編寫的統(tǒng)計(jì)模型進(jìn)行推理。Bean Machine 構(gòu)建在 PyTorch 和 Bean Machine Graph(自定義 C++ 后端)之上。
安裝
Bean Machine 支持 Python 3.7、3.8 和 PyTorch 1.10。
使用 Pip 安裝最新版本
pip install beanmachine
從源代碼安裝
從 GitHub 下載最新的 Bean Machine 源代碼:
git clone https://github.com/facebookresearch/beanmachine.git cd beanmachine
然后,您可以從以下任一安裝選項(xiàng)中進(jìn)行選擇。
Anaconda
我們建議使用 conda 來管理虛擬環(huán)境并安裝必要的構(gòu)建依賴項(xiàng)。
conda create -n {env name} python=3.7; conda activate {env name}
conda install boost eigen
pip install
Docker
docker build -t beanmachine .
docker run -it beanmachine:latest bash
驗(yàn)證安裝
如果您想運(yùn)行內(nèi)置單元測試:
# install pytest 7.0 from GitHub pip install git+https://github.com/pytest-dev/[email protected] pytest .
評論
圖片
表情
