Common
Gaussian
¤
Bases: Distribution
Multivariate Gaussian distribution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mean |
Array
|
Mean. |
required |
cov |
Array
|
Covariance matrix. |
required |
learnable |
bool
|
Whether the mean and covariance matrix are learnable parameters. |
False
|
Attributes:
Name | Type | Description |
---|---|---|
mean |
Array
|
Mean. |
cov |
Array
|
Covariance matrix. |
Source code in flowMC/nfmodel/common.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
|
MLP
¤
Bases: Module
Multilayer perceptron.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
shape |
List[int]
|
Shape of the MLP. The first element is the input dimension, the last element is the output dimension. |
required |
key |
PRNGKeyArray
|
Random key. |
required |
Attributes:
Name | Type | Description |
---|---|---|
layers |
List
|
List of layers. |
activation |
Callable
|
Activation function. |
use_bias |
bool
|
Whether to use bias. |
Source code in flowMC/nfmodel/common.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|
MaskedCouplingLayer
¤
Bases: Bijection
Masked coupling layer.
f(x) = (1-m)b(x;c(mx;z)) + m*x where b is the inner bijector, m is the mask, and c is the conditioner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bijector |
Bijection
|
inner bijector in the masked coupling layer. |
required |
mask |
Array
|
Mask. 0 for the input variables that are transformed, 1 for the input variables that are not transformed. |
required |
Source code in flowMC/nfmodel/common.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
|