# 受限玻耳兹曼机

## 玻尔兹曼分布

玻尔兹曼分布是统计物理中的一种概率分布，描述系统处于某种状态的概率分布（能量越大概率越低）：

$$
p(x)=\frac{exp(-energy(x))}{z}
$$

可见单元和隐藏单元的值服从玻尔兹曼分布

$$
p(v,h)=\frac{1}{Z\_{\theta}}exp(-E\_{\theta}(v,h))=\frac{1}{Z\_{\theta}}exp(v^TWh+b^Tv+d^Th)
$$

其中能量定义为：

$$
E\_{\theta}(v,h)=-v^TWh-b^Tv-d^Th
$$

归一化因子为:

$$
Z\_{\theta}=\sum\_{(v,h)} exp(-E\_{\theta}(v,h))
$$

![](/files/-Lpsm_plyj_CJaxuEv1O)

上图概率分布表：

4个输入可见，3个隐藏，每个有0/1状态，部分表

![](/files/-Lpsm_pyUa6cPV2wq8U5)

## 用于特征提取

可见单元作为输入数据，隐藏单元作为特征向量，计算隐藏层神经元的激励能量

$$
a\_i=\sum\_{j}w\_{ij}v\_j+d\_i
$$

计算该隐藏单元的条件概率值，即状态为1的概率：

$$
p\_i=\sigma(a\_i)
$$

以p的概率将隐藏层神经元的状态值设置为1，以1-p的概率将其设置为0，也就是3神经元都有可能是0/1状态，1表示选择这个维度的特征

$$
\left\[
\begin{matrix}
0 & 1 \\
0 & 1 \\
0 & 1
\end{matrix}
\right]
$$

## 深度受限玻耳兹曼

拿多个玻耳兹曼串起来，和编码器一样


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://im-qianuxn.gitbook.io/pytorch/ji-suan-ji/shen-du-xue-xi-li-lun/shou-xian-bo-er-ci-man.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
