TFGENZOO.flows.utils.util module¶
-
TFGENZOO.flows.utils.util.
bits_x
(log_likelihood: tensorflow.python.framework.ops.Tensor, log_det_jacobian: tensorflow.python.framework.ops.Tensor, pixels: int, n_bits: int = 8)[source]¶ bits/dims
Sources:
- Parameters
log_likelihood (tf.Tensor) – shape is [batch_size,]
log_det_jacobian (tf.Tensor) – shape is [batch_size,]
pixels (int) – e.g. HWC image => H * W * C
n_bits (int) – e.g [0 255] image => 8 = log(256)
- Returns
shape is [batch_size,]
- Return type
bits_x
Note
formula
\[bits\_x = - \cfrac{(log\_likelihood + log\_det\_jacobian)} {pixels \log{2}} + n\_bits\]