
Stacked (deep) autoencoder forward pass (morie.fn grstae)
Source:R/geron_train_native.R
morie_geron_stacked_autoencoder.RdEncoder matrices in, tied transposes back out; the bottleneck is enforced and the tower's symmetry checked. No biases.
Usage
morie_geron_stacked_autoencoder(
x,
layer_weights,
activation = "relu",
tied = TRUE,
output_activation = "linear"
)Examples
set.seed(6)
x <- matrix(rnorm(12), 3, 4)
W1 <- matrix(rnorm(8, 0, 0.3), 4, 2)
r <- morie_geron_stacked_autoencoder(x, list(W1), activation = "relu",
tied = TRUE)
str(r, max.level = 1)
#> List of 8
#> $ reconstruction : num [1:3, 1:4] 0.01571 0.38394 0.02002 -0.00886 -0.24605 ...
#> $ code : num [1:3, 1:2] 0.0802 0 0.1022 0 0.7494 ...
#> $ activations :List of 3
#> $ reconstruction_error: num 0.948
#> $ compression : num 2
#> $ tied : logi TRUE
#> $ estimate : num [1:3, 1:4] 0.01571 0.38394 0.02002 -0.00886 -0.24605 ...
#> $ n : int 3