
MLP forward pass (Geron Ch 10, morie.fn grmlpf)
Source:R/geron_train_native.R
morie_geron_mlp_forward.Rda_l = phi(W_l a_{l-1} + b_l), stacked
morie_geron_linear_layer_forward() calls; the last layer uses
output_activation.
Examples
morie_geron_mlp_forward(x = 5L, weights = c(1, 2, 3, 4, 5, 6, 7, 8),
biases = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $output
#> [1] 311200
#>
#> $activations
#> $activations[[1]]
#> [1] 5
#>
#> $activations[[2]]
#> [1] 6
#>
#> $activations[[3]]
#> [1] 14
#>
#> $activations[[4]]
#> [1] 45
#>
#> $activations[[5]]
#> [1] 184
#>
#> $activations[[6]]
#> [1] 925
#>
#> $activations[[7]]
#> [1] 5556
#>
#> $activations[[8]]
#> [1] 38899
#>
#> $activations[[9]]
#> [1] 311200
#>
#>
#> $layer_sizes
#> [1] 1 1 1 1 1 1 1 1 1
#>
#> $n_layers
#> [1] 8
#>
#> $n_parameters
#> [1] 16
#>
#> $dead_units
#> [1] 0
#>
#> $estimate
#> [1] 311200
#>
#> $n
#> [1] 1
#>