All Projects → imatge-upc → Skiprnn 2017 Telecombcn

imatge-upc / Skiprnn 2017 Telecombcn

Licence: mit
Skip RNN: Learning to Skip State Updates in Recurrent Neural Networks (ICLR 2018)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Skiprnn 2017 Telecombcn

Emnist
A project designed to explore CNN and the effectiveness of RCNN on classifying the EMNIST dataset.
Stars: ✭ 81 (-28.95%)
Mutual labels:  recurrent-neural-networks
Kerasr
R interface to the keras library
Stars: ✭ 90 (-21.05%)
Mutual labels:  recurrent-neural-networks
Pytorch Esn
An Echo State Network module for PyTorch.
Stars: ✭ 98 (-14.04%)
Mutual labels:  recurrent-neural-networks
Language Translation
Neural machine translator for English2German translation.
Stars: ✭ 82 (-28.07%)
Mutual labels:  recurrent-neural-networks
Malware Classification
Towards Building an Intelligent Anti-Malware System: A Deep Learning Approach using Support Vector Machine for Malware Classification
Stars: ✭ 88 (-22.81%)
Mutual labels:  recurrent-neural-networks
Easyesn
Python library for Reservoir Computing using Echo State Networks
Stars: ✭ 93 (-18.42%)
Mutual labels:  recurrent-neural-networks
Gru Svm
[ICMLC 2018] A Neural Network Architecture Combining Gated Recurrent Unit (GRU) and Support Vector Machine (SVM) for Intrusion Detection
Stars: ✭ 76 (-33.33%)
Mutual labels:  recurrent-neural-networks
Top Deep Learning
Top 200 deep learning Github repositories sorted by the number of stars.
Stars: ✭ 1,365 (+1097.37%)
Mutual labels:  recurrent-neural-networks
Deep Learning For Beginners
videos, lectures, blogs for Deep Learning
Stars: ✭ 89 (-21.93%)
Mutual labels:  recurrent-neural-networks
Pytorch Learners Tutorial
PyTorch tutorial for learners
Stars: ✭ 97 (-14.91%)
Mutual labels:  recurrent-neural-networks
Tnn
Biologically-realistic recurrent convolutional neural networks
Stars: ✭ 83 (-27.19%)
Mutual labels:  recurrent-neural-networks
Text classification
Text Classification Algorithms: A Survey
Stars: ✭ 1,276 (+1019.3%)
Mutual labels:  recurrent-neural-networks
Pytorch Pos Tagging
A tutorial on how to implement models for part-of-speech tagging using PyTorch and TorchText.
Stars: ✭ 96 (-15.79%)
Mutual labels:  recurrent-neural-networks
Simplednn
SimpleDNN is a machine learning lightweight open-source library written in Kotlin designed to support relevant neural network architectures in natural language processing tasks
Stars: ✭ 81 (-28.95%)
Mutual labels:  recurrent-neural-networks
Chemgan Challenge
Code for the paper: Benhenda, M. 2017. ChemGAN challenge for drug discovery: can AI reproduce natural chemical diversity? arXiv preprint arXiv:1708.08227.
Stars: ✭ 98 (-14.04%)
Mutual labels:  recurrent-neural-networks
Ai Reading Materials
Some of the ML and DL related reading materials, research papers that I've read
Stars: ✭ 79 (-30.7%)
Mutual labels:  recurrent-neural-networks
Multitask sentiment analysis
Multitask Deep Learning for Sentiment Analysis using Character-Level Language Model, Bi-LSTMs for POS Tag, Chunking and Unsupervised Dependency Parsing. Inspired by this great article https://arxiv.org/abs/1611.01587
Stars: ✭ 93 (-18.42%)
Mutual labels:  recurrent-neural-networks
Rnn Text Classification Tf
Tensorflow Implementation of Recurrent Neural Network (Vanilla, LSTM, GRU) for Text Classification
Stars: ✭ 114 (+0%)
Mutual labels:  recurrent-neural-networks
Mad Twinnet
The code for the MaD TwinNet. Demo page:
Stars: ✭ 99 (-13.16%)
Mutual labels:  recurrent-neural-networks
Handwriting Synthesis
Handwriting Synthesis with RNNs ✏️
Stars: ✭ 1,340 (+1075.44%)
Mutual labels:  recurrent-neural-networks

Skip RNN: Learning to Skip State Updates in Recurrent Neural Networks

Víctor Campos Brendan Jou Jordi Torres Xavier Giro-i-Nieto Shih-Fu Chang
Víctor Campos Brendan Jou Jordi Torres Xavier Giró-i-Nieto Shih-Fu Chang

A joint collaboration between:

logo-bsc logo-google logo-upc logo-columbia
Barcelona Supercomputing Center (BSC) Google Inc. Universitat Politècnica de Catalunya (UPC) Columbia University

Abstract

Recurrent Neural Networks (RNNs) continue to show outstanding performance in sequence modeling tasks. However, training RNNs on long sequences often face challenges like slow inference, vanishing gradients and difficulty in capturing long term dependencies. In backpropagation through time settings, these issues are tightly coupled with the large, sequential computational graph resulting from unfolding the RNN in time. We introduce the Skip RNN model which extends existing RNN models by learning to skip state updates and shortens the effective size of the computational graph. This model can also be encouraged to perform fewer state updates through a budget constraint. We evaluate the proposed model on various tasks and show how it can reduce the number of required RNN updates while preserving, and sometimes even improving, the performance of the baseline RNN models.

 

model

 

Publication

Victor Campos, Brendan Jou, Xavier Giro-i-Nieto, Jordi Torres, and Shih-Fu Chang. "Skip RNN: Learning to Skip State Updates in Recurrent Neural Networks", In International Conference on Learning Representations, 2018.

@inproceedings{campos2018skip,
title={Skip RNN: Learning to Skip State Updates in Recurrent Neural Networks},
author={Campos, V{\'\i}ctor and Jou, Brendan and Gir{\'o}-i-Nieto, Xavier and Torres, Jordi and Chang, Shih-Fu},
booktitle={International Conference on Learning Representations},
year={2018}
}

Code

Dependencies

This code was developed with Python 3.6.0 and TensorFlow 1.13.1. An older version of the code for TensorFlow 1.0.0 is available under the tags menu. To download and install TensorFlow, please follow the official guide.

Using the models

The models are ready to be used with TensorFlow's tf.nn.dynamic_rnn and can be found under src/rnn_cells/skip_rnn_cells.py. We provide four different RNN cells:

  • SkipLSTMCell: single SkipLSTM layer
  • SkipGRUCell: single SkipGRU layer
  • MultiSkipLSTMCell: stack of multiple SkipLSTM layers
  • MultiSkipGRUCell: stack of multiple SkipGRU layers

An usage example can be found below:

import tensorflow as tf
from rnn_cells.skip_rnn_cells import SkipLSTM

# Define constants and hyperparameters
NUM_CELLS = 110
BATCH_SIZE = 256
INPUT_SIZE = 10
COST_PER_SAMPLE = 1e-05

# Placeholder for the input tensor with shape (batch, time, input_dims)
x = tf.placeholder(tf.float32, [None, None, INPUT_SIZE])

# Create SkipLSTM and trainable initial state
cell = SkipLSTMCell(NUM_CELLS)
initial_state = cell.trainable_initial_state(BATCH_SIZE)

# Dynamic RNN unfolding
rnn_outputs, rnn_states = tf.nn.dynamic_rnn(cell, x, dtype=tf.float32, initial_state=initial_state)

# Split the output into the actual RNN output and the state update gate
rnn_outputs, updated_states = rnn_outputs.h, rnn_outputs.state_gate

# Add a penalization for each state update (i.e. used sample)
budget_loss = tf.reduce_mean(tf.reduce_sum(COST_PER_SAMPLE * updated_states, 1), 0)

PyTorch version

This repository contains a PyTorch implementation of Skip RNN by Albert Berenguel.

Acknowledgments

We would like to especially thank the technical support team at the Barcelona Supercomputing Center, as well as Oscar Mañas for updating the original codebase to TensorFlow 1.13.1, adding TensorBoard support and improving the data loading pipeline.

This work has been supported by the grant SEV2015-0493 of the Severo Ochoa Program awarded by Spanish Government, project TIN2015-65316 by the Spanish Ministry of Science and Innovation contracts 2014-SGR-1051 by Generalitat de Catalunya logo-severo
We gratefully acknowledge the support of NVIDIA Corporation through the BSC/UPC NVIDIA GPU Center of Excellence. logo-gpu_excellence_center
The Image ProcessingGroup at the UPC is a SGR14 Consolidated Research Group recognized and sponsored by the Catalan Government (Generalitat de Catalunya) through its AGAUR office. logo-catalonia
This work has been developed in the framework of the project BigGraph TEC2013-43935-R, funded by the Spanish Ministerio de Economía y Competitividad and the European Regional Development Fund (ERDF). logo-spain

Contact

If you have any general doubt about our work or code which may be of interest for other researchers, please use the mailto:[email protected].

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].