allennlp.modules.attention.cosine_attention#

CosineAttention#

CosineAttention(self, normalize:bool=True) -> None

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

Registered as an Attention with name "cosine".