
Convolutional autoencoder forward pass (Geron Ch 18, morie.fn grcae)
Source:R/geron_ml_native.R
morie_geron_convolutional_autoencoder.RdStrided-conv encoder with ReLU after every layer; transposed-conv decoder with ReLU after every layer but the last. Transposed conv gives (n-1)s + k per axis, so a decoder that does not land back on the input size is an error rather than a silent crop.
Usage
morie_geron_convolutional_autoencoder(
x,
encoder_weights,
decoder_weights,
stride = 2,
output_activation = "identity"
)Examples
morie_geron_convolutional_autoencoder(x = 5L, encoder_weights = c(1, 2, 3, 4, 5, 6, 7, 8),
decoder_weights = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $x_hat
#> [,1]
#> [1,] 8128512000
#>
#> $code
#> [,1]
#> [1,] 201600
#>
#> $code_shape
#> [1] 1 1
#>
#> $loss
#> [1] 6.607271e+19
#>
#> $mse_per_pixel
#> [1] 6.607271e+19
#>
#> $compression_ratio
#> [1] 1
#>
#> $estimate
#> [1] 6.607271e+19
#>
#> $n
#> [1] 1
#>
#> $method
#> [1] "Convolutional autoencoder forward pass"
#>