h = W_0 x + Lambda_b B Lambda_d A x; only the two diagonals train.
Examples
morie_kamath_ch4_vera_forward(diag(2), c(2, 3), c(5), matrix(c(1,
1), 1), matrix(c(1, 2), 2), c(1, 2))
#> $h
#> [1] 31 92
#>
#> $base
#> [1] 1 2
#>
#> $delta_h
#> [1] 30 90
#>
#> $r
#> [1] 1
#>
#> $n_trainable
#> [1] 3
#>
#> $n_trainable_lora
#> [1] 4
#>
#> $estimate
#> [1] 31
#>
#> $n
#> [1] 2
#>
#> $method
#> [1] "VeRA forward pass (Kamath Eq 4.10)"
#>
