参考:

  • https://github.com/tlatkowski/multihead-siamese-nets/blob/master/layers/attention.py