
Autoencoder reconstruction loss and compression (Geron Ch 18, grael)
Source:R/geron_ml_native.R
morie_geron_autoencoder_reconstruction_loss.Rdloss is the mean squared L2 norm PER SAMPLE, mse_per_element the
plain elementwise mean; compression_ratio = input_dim / code_dim.
Value
List with loss, mse_per_element, per_sample_loss,
code_dim, input_dim, compression_ratio, explained_variance.
Examples
morie_geron_autoencoder_reconstruction_loss(X = matrix(c(1, 2, 3, 4, 5, 6), nrow = 2),
encoded = matrix(c(1, 2, 3, 4, 5, 6), nrow = 2),
decoded = matrix(c(1, 2, 3, 4, 5, 6), nrow = 2))
#> $loss
#> [1] 0
#>
#> $mse_per_element
#> [1] 0
#>
#> $per_sample_loss
#> [1] 0 0
#>
#> $code_dim
#> [1] 3
#>
#> $input_dim
#> [1] 3
#>
#> $compression_ratio
#> [1] 1
#>
#> $explained_variance
#> [1] 1
#>
#> $estimate
#> [1] 0
#>
#> $n
#> [1] 2
#>
#> $method
#> [1] "Autoencoder reconstruction loss"
#>