
Affine layer forward pass (Geron Ch 10, morie.fn grlinf)
Source:R/geron_train_native.R
morie_geron_linear_layer_forward.RdY = X W^T + b with W stored (out, in) as in nn.Linear.
Examples
morie_geron_linear_layer_forward(X = c(1, 2, 3, 4, 5, 6, 7, 8), W = c(1, 2, 3, 4, 5, 6, 7, 8),
b = 5L)
#> $output
#> [1] 209
#>
#> $preactivation_norm
#> [1] 209
#>
#> $in_features
#> [1] 8
#>
#> $out_features
#> [1] 1
#>
#> $n_parameters
#> [1] 9
#>
#> $batch
#> [1] FALSE
#>
#> $estimate
#> [1] 209
#>
#> $n
#> [1] 1
#>