jittor.attention

这里是Jittor的 注意力 模块的API文档,您可以通过from jittor import attention来获取该模块。

class jittor.attention.MultiheadAttention(embed_dim, num_heads, kdim=None, vdim=None, dropout=0.0, bias=True, add_bias_kv=False, add_zero_attn=False, self_attention=False, encoder_decoder_attention=False, q_noise=0.0, qn_block_size=8)[源代码]
execute(query, key=None, value=None, key_padding_mask=None, incremental_state=None, need_weights=True, static_kv=False, attn_mask=None, before_softmax=False, need_head_weights=False)[源代码]
reset_parameters()[源代码]