{"id":15937100,"url":"https://github.com/zimmerrol/tf_keras_attention","last_synced_at":"2026-05-10T02:53:41.268Z","repository":{"id":98201822,"uuid":"136238790","full_name":"zimmerrol/tf_keras_attention","owner":"zimmerrol","description":"Implementation and demonstration of how to apply 2D Gaussian Attention with Keras/TensorFlow","archived":false,"fork":false,"pushed_at":"2018-06-05T22:20:30.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-09T08:17:05.893Z","etag":null,"topics":["attention","attention-mechanism","deep-learning","gaussian-attention","keras","neural-network","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zimmerrol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-05T21:51:02.000Z","updated_at":"2019-03-02T12:54:35.000Z","dependencies_parsed_at":"2023-03-08T12:15:42.255Z","dependency_job_id":null,"html_url":"https://github.com/zimmerrol/tf_keras_attention","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimmerrol%2Ftf_keras_attention","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimmerrol%2Ftf_keras_attention/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimmerrol%2Ftf_keras_attention/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zimmerrol%2Ftf_keras_attention/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zimmerrol","download_url":"https://codeload.github.com/zimmerrol/tf_keras_attention/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247070780,"owners_count":20878581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["attention","attention-mechanism","deep-learning","gaussian-attention","keras","neural-network","tensorflow"],"created_at":"2024-10-07T04:42:17.328Z","updated_at":"2026-05-10T02:53:41.222Z","avatar_url":"https://github.com/zimmerrol.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 2D (Visual) Attention for TensorFlow and Keras\n\nThe 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.\n\nThe repository contains the pure *TensorFlow* based implementation and a *Keras* *Layer* which is wrapped around the code. Furthermore, a small example notebook is added. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzimmerrol%2Ftf_keras_attention","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzimmerrol%2Ftf_keras_attention","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzimmerrol%2Ftf_keras_attention/lists"}