MeshyOA #8
Attention as Adder (Python)
估计中等评测数据准备中,可先阅读题面
考点(AI 标注)位运算
Given a single layer of self-attention, manually figure out the parameters Q, K, V (i.e. W_q, W_k, W_v) required to compute the sum of two scalar inputs.
Inputs:
v.shape == (1, 2, 1) # batch x sequence x hidden, values e.g. [1, 10]
Expected:
result[0, 0, 0] == 1 + 10 == 11