
Layer normalization: per-sample, across features (Geron Ch 11, morie.fn hmlntr)
Source:R/geron_w4b_native.R
morie_geron_layer_normalization_hmlntr.RdLayer normalization: per-sample, across features (Geron Ch 11, morie.fn hmlntr)
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_geron_layer_normalization_hmlntr(V)
#> $y
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7]
#> [1,] -1.527524 -1.091088 -0.654653 -0.2182177 0.2182177 0.654653 1.091088
#> [,8]
#> [1,] 1.527524
#>
#> $x_hat
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7]
#> [1,] -1.527524 -1.091088 -0.654653 -0.2182177 0.2182177 0.654653 1.091088
#> [,8]
#> [1,] 1.527524
#>
#> $mu
#> [1] 4.5
#>
#> $var
#> [1] 5.25
#>
#> $gamma
#> [1] 1 1 1 1 1 1 1 1
#>
#> $beta
#> [1] 0 0 0 0 0 0 0 0
#>
#> $estimate
#> [1] 0
#>
#> $n
#> [1] 1
#>
#> $method
#> [1] "Layer normalization (per-sample, across features)"
#>