keras-self-attention-layer
keras-self-attention-layer copied to clipboard
a simple implementation of self attention layer that outputs flattened sentence embedding matrix, with the Frobenius norm penalty