
Perceiver IO cross-attention bottleneck (morie.fn grpio)
Source:R/geron_train_native.R
morie_geron_perceiver_io.RdLatents cross-attend to the input, then self-attend, n_iter times;
output queries decode the final latent. All attention through the
shared kernel, with no learned projections.
Value
List with output, latent, cross_weights,
latent_self_weights, output_weights, complexity_ratio.
Examples
morie_geron_perceiver_io(X = c(1, 2, 3, 4, 5, 6, 7, 8), Z_latent = c(1, 2, 3, 4, 5, 6, 7, 8),
output_queries = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $output
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
#> [1,] 1 2 3 4 5 6 7 8
#>
#> $latent
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
#> [1,] 1 2 3 4 5 6 7 8
#>
#> $cross_weights
#> $cross_weights[[1]]
#> [,1]
#> [1,] 1
#>
#>
#> $latent_self_weights
#> $latent_self_weights[[1]]
#> [,1]
#> [1,] 1
#>
#>
#> $output_weights
#> [,1]
#> [1,] 1
#>
#> $complexity_ratio
#> [1] 1
#>
#> $estimate
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
#> [1,] 1 2 3 4 5 6 7 8
#>
#> $n
#> [1] 1
#>