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
IfΦ(Tl,Tr)
PφΘ(Tl,Tr)
Q,K,VLZ(I+P)
WS(QKTdk)
AiW·V
ULZ(A1A2,An)
end for
return U