Logs
VAE.logs
Collection of log functions for model training.
VAE.logs.ActiveUnits
ActiveUnits(z_mean, z_log_var, kl_threshold=0.1)
Number of active units.
Return metric for number of active units that are above the threshold specified in kl_threshold
.
Parameters:
-
z_mean
(Tensor
) –Output node of encoder, specifying
z_mean
. -
z_log_var
(Tensor
) –Output node of encoder, specifying
z_log_var
. -
kl_threshold
(float
, default:0.1
) –Lower bound for the KL divergence above which a latent dimension is assumed to be active.
Returns:
-
callable
–Metrics that returns the number of active units.
Source code in VAE/logs.py
9 10 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 |
|
VAE.logs.Beta
Beta(beta)
Beta value.
Returns metrics for beta value, which can be added to the model metrics for logging purposes.
Parameters:
-
beta
(Tensor
) –Beta multiplier of the KL divergence.
Returns:
-
callable
–Metric function that reduces the beta tensor to a scalar.
Source code in VAE/logs.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|