Algorithm 20 lines 7-9 of the Supplementary Information to Jumper et al.
(2021), p. 26. A three-layer residual MLP applied to the single
representation between invariant point attention and the backbone
update, followed by layer normalisation. Unlike the Evoformer
transitions this one keeps the channel width constant.
Usage
Alfstrtr(s, w1, w2, w3, layernorm = TRUE, drop = NULL)
Arguments
- s
Single representation, an n x cs matrix.
- w1, w2, w3
The three projections of line 8, each cs x cs.
- layernorm
Apply the layer normalisation of line 9.
- drop
Optional multiplicative dropout mask, n x cs.
Value
A list with s, estimate, n and method.
References
Jumper et al (2021) Nature 596:583-589, Suppl. Algorithm 20
Examples
set.seed(20)
s <- matrix(rnorm(6), 3, 2)
w <- function() matrix(rnorm(4, sd = 0.3), 2, 2)
round(Alfstrtr(s, w(), w(), w())$s, 3)
#> [,1] [,2]
#> [1,] 1.000 -1.000
#> [2,] -0.999 0.999
#> [3,] 1.000 -1.000