All Projects → GokuMohandas → Attentional Interfaces

GokuMohandas / Attentional Interfaces

🔍 Attentional interfaces in TensorFlow.

Projects that are alternatives of or similar to Attentional Interfaces

Poetry Seq2seq
Chinese Poetry Generation
Stars: ✭ 159 (+174.14%)
Mutual labels:  jupyter-notebook, attention-mechanism
Da Rnn
📃 **Unofficial** PyTorch Implementation of DA-RNN (arXiv:1704.02971)
Stars: ✭ 256 (+341.38%)
Mutual labels:  jupyter-notebook, attention-mechanism
Graph attention pool
Attention over nodes in Graph Neural Networks using PyTorch (NeurIPS 2019)
Stars: ✭ 186 (+220.69%)
Mutual labels:  jupyter-notebook, attention-mechanism
Yolov3 Point
从零开始学习YOLOv3教程解读代码+注意力模块(SE,SPP,RFB etc)
Stars: ✭ 119 (+105.17%)
Mutual labels:  jupyter-notebook, attention-mechanism
Pytorch Original Transformer
My implementation of the original transformer model (Vaswani et al.). I've additionally included the playground.py file for visualizing otherwise seemingly hard concepts. Currently included IWSLT pretrained models.
Stars: ✭ 411 (+608.62%)
Mutual labels:  jupyter-notebook, attention-mechanism
Abstractive Summarization
Implementation of abstractive summarization using LSTM in the encoder-decoder architecture with local attention.
Stars: ✭ 128 (+120.69%)
Mutual labels:  jupyter-notebook, attention-mechanism
Triplet Attention
Official PyTorch Implementation for "Rotate to Attend: Convolutional Triplet Attention Module." [WACV 2021]
Stars: ✭ 222 (+282.76%)
Mutual labels:  jupyter-notebook, attention-mechanism
Csa Inpainting
Coherent Semantic Attention for image inpainting(ICCV 2019)
Stars: ✭ 202 (+248.28%)
Mutual labels:  jupyter-notebook, attention-mechanism
Action Recognition Visual Attention
Action recognition using soft attention based deep recurrent neural networks
Stars: ✭ 350 (+503.45%)
Mutual labels:  jupyter-notebook, attention-mechanism
Adaptiveattention
Implementation of "Knowing When to Look: Adaptive Attention via A Visual Sentinel for Image Captioning"
Stars: ✭ 303 (+422.41%)
Mutual labels:  jupyter-notebook, attention-mechanism
Linear Attention Recurrent Neural Network
A recurrent attention module consisting of an LSTM cell which can query its own past cell states by the means of windowed multi-head attention. The formulas are derived from the BN-LSTM and the Transformer Network. The LARNN cell with attention can be easily used inside a loop on the cell state, just like any other RNN. (LARNN)
Stars: ✭ 119 (+105.17%)
Mutual labels:  jupyter-notebook, attention-mechanism
Pytorch Gat
My implementation of the original GAT paper (Veličković et al.). I've additionally included the playground.py file for visualizing the Cora dataset, GAT embeddings, an attention mechanism, and entropy histograms. I've supported both Cora (transductive) and PPI (inductive) examples!
Stars: ✭ 908 (+1465.52%)
Mutual labels:  jupyter-notebook, attention-mechanism
Group Level Emotion Recognition
Model submitted for the ICMI 2018 EmotiW Group-Level Emotion Recognition Challenge
Stars: ✭ 70 (+20.69%)
Mutual labels:  jupyter-notebook, attention-mechanism
Pytorch Question Answering
Important paper implementations for Question Answering using PyTorch
Stars: ✭ 154 (+165.52%)
Mutual labels:  jupyter-notebook, attention-mechanism
Attention is all you need
Transformer of "Attention Is All You Need" (Vaswani et al. 2017) by Chainer.
Stars: ✭ 303 (+422.41%)
Mutual labels:  jupyter-notebook, attention-mechanism
Deeplearning.ai Natural Language Processing Specialization
This repository contains my full work and notes on Coursera's NLP Specialization (Natural Language Processing) taught by the instructor Younes Bensouda Mourri and Łukasz Kaiser offered by deeplearning.ai
Stars: ✭ 473 (+715.52%)
Mutual labels:  jupyter-notebook, attention-mechanism
Show Attend And Tell
TensorFlow Implementation of "Show, Attend and Tell"
Stars: ✭ 869 (+1398.28%)
Mutual labels:  jupyter-notebook, attention-mechanism
Regex In Python
A comprehensive guide for learning regular expressions using Python
Stars: ✭ 58 (+0%)
Mutual labels:  jupyter-notebook
Big Mac Data
Data and methodology for the Big Mac index
Stars: ✭ 1,095 (+1787.93%)
Mutual labels:  jupyter-notebook
Face recognition using pytorch
Using MTCNN and MobileFaceNet on Face Recognition
Stars: ✭ 58 (+0%)
Mutual labels:  jupyter-notebook

Interpretability via Attentional and Memory-based Interfaces Using TensorFlow

A closer look at the reasoning inside your deep networks.

TLDR: This post will serve as a gentle introduction to attentional and memory-based interfaces in deep neural architectures using TensorFlow. Incorporation of attention mechanisms is very simple and can improve transparency interpretability in our complex models. We will conclude with extensions and caveats of the interfaces. The intended audience for this notebook are developers and researchers who have some basic understanding of Tensorflow and fundamental deep learning concepts. Check out this post for a nice introduction to Tensorflow. image1 Note: This code has been written for TensorFlow v1.0.0

Before running the Jupyter notebook attention.ipynb, you'll need to ensure that your machine is set up to run TensorFlow and install a handful of helpful additional libraries.

Setup

  1. Download this entire repo from GitHub

  2. Open your terminal and use cd to navigate into the top directory of the repo on your machine

  3. Unzip the processed reviews data by entering the following inside the data directory.

unzip processed_reviews.zip

Now, set up your environment by using the Dockerfile included with this repo (option A) or configuring it manually (option B).

Option A: use the Dockerfile configured for this notebook

(Note: For GPU versions, etc. check out TensorFlow's Docker repo.)

  1. After downloading this repo to your machine, open your terminal and use cd to navigate to the directory that contains Dockerfile.cpu.

  2. To build the Dockerfile, enter

docker build -t dockerfile_cpu -f dockerfile.cpu .

If you get a permissions error on running this command, you may need to run it with sudo:

sudo  build -t dockerfile_cpu -f dockerfile.cpu .
  1. Run Docker from the Dockerfile you've just built
docker run -it -p 8888:8888 -p 6006:6006 dockerfile_cpu bash

or

sudo docker run -it -p 8888:8888 -p 6006:6006 dockerfile_cpu bash

if you run into permission problems.

  1. Launch Jupyter by entering
jupyter notebook

and, using your browser, navigate to the URL shown in the terminal output (usually http://localhost:8888/)

Option B: set up environment manually on local machine

For instructions on installing TensorFlow, please see TensorFlow's platform-specific installation instructions.

Required:
python 3.3+
pip 9.0.1 (sudo easy_install pip)
virtualenv (pip install virtualenv)
Optional: CUDA enabled GPU (explicity define cpu components (embedding, etc.)
  1. Enter the attention directory in your terminal and enter the following commands
make venv
source oreilly-attention-venv/bin/activate
make load-data
ipython3 notebook attention.ipynb
  1. Launch Jupyter by entering
jupyter notebook

and, using your browser, navigate to the URL shown in the terminal output (usually http://localhost:8888/)

Contact:

Goku Mohandas

Author Bio:

Goku Mohandas is an artificial intelligence (AI) researcher in Silicon Valley with a focus on using deep learning for natural language tasks. His interests include research on AI for intelligent search and question answering augmented by attentional and memory-based interfaces. He also strongly believes in the democratization of AI with a focus on interpretability and transparency. Previous work includes working on the intersection of AI and biotechnology at the Johns Hopkins University Applied Physics Laboratory.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].