File tree Expand file tree Collapse file tree 4 files changed +31
-7
lines changed Expand file tree Collapse file tree 4 files changed +31
-7
lines changed Original file line number Diff line number Diff line change 8
8
9
9
正态分布
10
10
11
- 数学公式 :
11
+ 若 ` loc ` 是实数,概率密度函数为 :
12
12
13
13
.. math ::
14
14
15
15
pdf(x; \mu , \sigma ) = \frac {1 }{Z}e^{\frac {-0.5 (x - \mu )^2 } {\sigma ^2 } }
16
16
17
17
Z = (2 \pi \sigma ^2 )^{0.5 }
18
18
19
+ 若 `loc ` 是复数,概率密度函数为:
20
+
21
+ .. math ::
22
+
23
+ pdf(x; \mu , \sigma ) = \frac {1 }{Z}e^{\frac {-(x - \mu )^2 } {\sigma ^2 } }
24
+
25
+ Z = \pi \sigma ^2
26
+
19
27
上面的数学公式中:
20
28
21
29
- :math: `loc = \mu `:平均值;
25
33
参数
26
34
::::::::::::
27
35
28
- - **loc ** (int|float|list|tuple|numpy.ndarray|Tensor) - 正态分布平均值。数据类型为 float32 或 float64 。
36
+ - **loc ** (int|float|complex| list|tuple|numpy.ndarray|Tensor) - 正态分布平均值。数据类型为 float32、float64、complex64 或 complex128 。
29
37
- **scale ** (int|float|list|tuple|numpy.ndarray|Tensor) - 正态分布标准差。数据类型为 float32 或 float64。
30
38
- **name ** (str,可选) - 具体用法请参见 :ref: `api_guide_Name `,一般无需设置,默认值为 None。
31
39
@@ -85,12 +93,18 @@ entropy()
85
93
86
94
信息熵
87
95
88
- 数学公式 :
96
+ 实高斯分布信息熵的数学公式 :
89
97
90
98
.. math ::
91
99
92
100
entropy(\sigma ) = 0.5 \log (2 \pi e \sigma ^2 )
93
101
102
+ 复高斯分布信息熵的数学公式:
103
+
104
+ .. math ::
105
+
106
+ entropy(\sigma ) = \log (\pi e \sigma ^2 ) + 1
107
+
94
108
上面的数学公式中:
95
109
96
110
:math: `scale = \sigma `:标准差。
@@ -130,7 +144,7 @@ kl_divergence(other)
130
144
131
145
两个正态分布之间的 KL 散度。
132
146
133
- 数学公式 :
147
+ 实高斯分布 KL 散度的数学公式 :
134
148
135
149
.. math ::
136
150
@@ -140,6 +154,16 @@ kl_divergence(other)
140
154
141
155
diff = \mu _1 - \mu _0
142
156
157
+ 复高斯分布 KL 散度的数学公式:
158
+
159
+ .. math ::
160
+
161
+ KL\_divergence(\mu _0 , \sigma _0 ; \mu _1 , \sigma _1 ) = ratio^2 + (\frac {diff}{\sigma _1 })^2 - 1 - 2 \ln {ratio}
162
+
163
+ ratio = \frac {\sigma _0 }{\sigma _1 }
164
+
165
+ diff = \mu _1 - \mu _0
166
+
143
167
上面的数学公式中:
144
168
145
169
- :math: `loc = \mu _0 `:当前正态分布的平均值;
Original file line number Diff line number Diff line change 11
11
参数
12
12
::::::::::::
13
13
14
- - **mean ** (float,可选) - 正态分布的平均值。默认值为 0。
14
+ - **mean ** (float|complex ,可选) - 正态分布的平均值。默认值为 0。
15
15
- **std ** (float,可选) - 正态分布的标准差。默认值为 1.0。
16
16
- **name ** (str,可选) - 具体用法请参见 :ref: `api_guide_Name `,一般无需设置,默认值为 None。
17
17
Original file line number Diff line number Diff line change 10
10
参数
11
11
::::::::::
12
12
- **shape ** (list|tuple|Tensor) - 生成的随机 Tensor 的形状。如果 ``shape `` 是 list、tuple,则其中的元素可以是 int,或者是形状为[]且数据类型为 int32、int64 的 0-D Tensor。如果 ``shape `` 是 Tensor,则是数据类型为 int32、int64 的 1-D Tensor。
13
- - **dtype ** (str|np.dtype,可选) - 输出 Tensor 的数据类型,支持 float32、float64。当该参数值为 None 时,输出 Tensor 的数据类型为 float32。默认值为 None。
13
+ - **dtype ** (str|np.dtype,可选) - 输出 Tensor 的数据类型,支持 float32、float64、complex64、complex128 。当该参数值为 None 时,输出 Tensor 的数据类型为 float32。默认值为 None。
14
14
- **name ** (str,可选) - 具体用法请参见 :ref: `api_guide_Name `,一般无需设置,默认值为 None。
15
15
16
16
返回
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ standard_normal
10
10
参数
11
11
::::::::::
12
12
- **shape ** (list|tuple|Tensor) - 生成的随机 Tensor 的形状。如果 ``shape `` 是 list、tuple,则其中的元素可以是 int,或者是形状为[]且数据类型为 int32、int64 的 0-D Tensor。如果 ``shape `` 是 Tensor,则是数据类型为 int32、int64 的 1-D Tensor。
13
- - **dtype ** (str|np.dtype,可选) - 输出 Tensor 的数据类型,支持 float32、float64。当该参数值为 None 时,输出 Tensor 的数据类型为 float32。默认值为 None。
13
+ - **dtype ** (str|np.dtype,可选) - 输出 Tensor 的数据类型,支持 float32、float64、complex64、complex128 。当该参数值为 None 时,输出 Tensor 的数据类型为 float32。默认值为 None。
14
14
- **name ** (str,可选) - 具体用法请参见 :ref: `api_guide_Name `,一般无需设置,默认值为 None。
15
15
16
16
返回
You can’t perform that action at this time.
0 commit comments