Skip to main content
. 2022 Dec 9;24(12):1798. doi: 10.3390/e24121798
Algorithm 1 Multi-Head Attention Algorithm.
Input: Tl, Tr of the time series, n the number of attention
Output: U the result of multi-head attention
for h = 0 to n do
I←fΦ(Tl,Tr)
P←φΘ(Tl,Tr)
Q,K,V←LZ(I+P)
W←S(QKTdk)
Ai←W·V
U←LZ(A1∪A2∪…,An)
end for
return U