cosine_attention
allennlp.modules.attention.cosine_attention
CosineAttention#
@Attention.register("cosine")
class CosineAttention(Attention)
Computes attention between a vector and a matrix using cosine similarity.
Registered as an Attention
with name "cosine".