xnn.trfnn.fast.et_kernels.attention_messages#

xnn.trfnn.fast.et_kernels.attention_messages(a, w, dw, cw, v, u, src, dst, heads)[source]#

The fused messages of every center: dx and the three rows of dv, (N, 4, F).

Parameters:
  • a (Tensor) – Attention weights (P, H).

  • w (Tensor) – Value projections (N, 3F), per head [s3 | s1 | s2].

  • dw (Tensor, optional) – Value filters of the pairs (P, 3F), the same layout.

  • cw (Tensor, optional) – Cutoff on the values (P,).

  • v (Tensor) – Vector features (N, 3, F).

  • u (Tensor) – Pair directions (P, 3).

  • src (Tensor) – Neighbor and center of every pair (P,).

  • dst (Tensor) – Neighbor and center of every pair (P,).

  • heads (int) – Number of heads.

Returns:

(N, 4, F).

Return type:

Tensor