
Flamingo: perceiver resampler + tanh-gated cross-attention (hmflmg)
Source:R/geron_w4a_native.R
morie_geron_flamingo.RdBoth attention stages delegated to morie_geron_cross_attention.
Usage
morie_geron_flamingo(
images,
text,
latents = NULL,
W_Q = NULL,
W_K = NULL,
W_V = NULL,
gate = 0,
image_index = NULL
)Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_geron_flamingo(V, V)
#> $output
#> [,1]
#> [1,] 1
#> [2,] 2
#> [3,] 3
#> [4,] 4
#> [5,] 5
#> [6,] 6
#> [7,] 7
#> [8,] 8
#>
#> $visual_tokens
#> [,1]
#> [1,] 4.5
#>
#> $cross_attention
#> [,1]
#> [1,] 4.5
#> [2,] 4.5
#> [3,] 4.5
#> [4,] 4.5
#> [5,] 4.5
#> [6,] 4.5
#> [7,] 4.5
#> [8,] 4.5
#>
#> $attention_weights
#> [,1]
#> [1,] 1
#> [2,] 1
#> [3,] 1
#> [4,] 1
#> [5,] 1
#> [6,] 1
#> [7,] 1
#> [8,] 1
#>
#> $resampler_weights
#> [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
#> [1,] 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125
#>
#> $gate_value
#> [1] 0
#>
#> $gate
#> [1] 0
#>
#> $is_identity_at_init
#> [1] TRUE
#>
#> $n_visual_tokens
#> [1] 1
#>
#> $n_image_features
#> [1] 8
#>
#> $delta_norm
#> [1] 0
#>
#> $estimate
#> [1] 0
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "perceiver resampler plus tanh-gated cross-attention; attention delegated to grca"
#>