Skip to main content

Unofficial TensorFlow implementation of a Linear Recurrent Unit, proposed by Google Deepmind.

Project description

Linear Recurrent Units in Tensorflow: An Unofficial Implementation

This repository presents an unofficial implementation of Linear Recurrent Units (LRUs) proposed by Google DeepMind, utilizing Tensorflow. LRUs draw inspiration from Deep State-Space Machines, with a particular focus on S4 and S5 models.

Installation:

$ pip install LRU-tensorflow

Usage:

import tensorflow as tf
from LRU_tensorflow import LRU

lru = LRU(N=state_features, H=input_size) 
test_input = tf.random.uniform((batch_size, seq_length, input_size))  # Example Test Input
predictions = lru(test_input) # Get predictions

Paper:

Resurrecting Recurrent Neural Networks for Long Sequences

Notes:

  • If you require an implementation that supports 3-dimensional input sequences, you may want to refer to github.com/Gothos/LRU-pytorch. However, please be aware that this alternative implementation might be slower due to the absence of associative scans.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

LRU-tensorflow-0.1.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

LRU_tensorflow-0.1.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file LRU-tensorflow-0.1.1.tar.gz.

File metadata

  • Download URL: LRU-tensorflow-0.1.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for LRU-tensorflow-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2d0ab371dad253299193780fb96112e7941497906ba38ba67e5b0bb0c04a8be5
MD5 23aa35e68f5e3b81a551dbee67d43f7d
BLAKE2b-256 e89785a59c6eea494d190ff5f2add4891946306ddd2b4b45c887dece9c56276e

See more details on using hashes here.

File details

Details for the file LRU_tensorflow-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for LRU_tensorflow-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ce9cea1c4c1934bb3f07cc73cb2584dcfde95963d87dc69b17f859f99427b270
MD5 c4b3fe6150bb74aca966d00ee05d19c4
BLAKE2b-256 8f859513ec74812bd6909297d74fb8e25568ab7eb4652eceb2019187c7fae5ab

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page