xnn.trfnn.fast.et_kernels.attention_logits#
- xnn.trfnn.fast.et_kernels.attention_logits(q, k, dk, src, dst, heads, key=None)[source]#
The fused logits
sum_(f in h) q[dst] k[src] dkof every pair and head,(P, H).- Parameters:
q (Tensor) – Queries and keys
(N, F).k (Tensor) – Queries and keys
(N, F).dk (Tensor, optional) – The key filters of the pairs
(P, F).src (Tensor) – Neighbor and center of every pair
(P,).dst (Tensor) – Neighbor and center of every pair
(P,).heads (int) – Number of heads
H(Fdivisible by it).key (Tensor, optional) – The object that identifies the pair list for the sort cache (for example the edge index
srcanddstare rows of); by defaultsrcanddstthemselves.
- Returns:
(P, H).- Return type:
Tensor