Skip to content

cosine_attention

[ allennlp.modules.attention.cosine_attention ]


CosineAttention Objects#

class CosineAttention(Attention)

Computes attention between a vector and a matrix using cosine similarity.

Registered as an Attention with name "cosine".