Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/zimmerrol/tf_keras_attention

Implementation and demonstration of how to apply 2D Gaussian Attention with Keras/TensorFlow
https://github.com/zimmerrol/tf_keras_attention

attention attention-mechanism deep-learning gaussian-attention keras neural-network tensorflow

Last synced: about 1 month ago
JSON representation

Implementation and demonstration of how to apply 2D Gaussian Attention with Keras/TensorFlow

Awesome Lists containing this project

README

        

# 2D (Visual) Attention for TensorFlow and Keras

The blog post [*Attention in Neural Networks and How to Use It*](http://akosiorek.github.io/ml/2017/10/14/visual-attention.html#mjx-eqn-att) by Adam Kosiorek shows a easy way to use Gaussian Attention on 2D data (e.g. images). However, this code can not directly be used for arbitrary batch sizes and numbers of channels in the input data. The changes required to use the described method on this kind of data are included in this repository.

The repository contains the pure *TensorFlow* based implementation and a *Keras* *Layer* which is wrapped around the code. Furthermore, a small example notebook is added.