rishikksh20 / Bidirectional-LEM-pytorch

Pytorch Implementation of Bidirectional Long Expressive Memory

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bidirectional Long Expressive Memory

This repository contains the implementation of Bidirectional Long Expressive Memory, which is the bidirectional form of the paper Long Expressive Memory for Sequence Modeling.

Note:

  • Cuda implementation required for faster implementation.

Usage:

import torch
from lem import BidirectionalSeqLEM


input = torch.ones([2, 1, 784])    # Size : [B, dim, seq_len]

model = BidirectionalSeqLEM( ninp = 1, nhid = 128)

ys = model(input.permute(2, 0, 1)) # ys shape : [seq_len, B, 2 * dim]

References:

About

Pytorch Implementation of Bidirectional Long Expressive Memory

License:MIT License


Languages

Language:Python 100.0%