Skip to content

SRU with length variable sequences (interfaces with PackedSequence)

Notifications You must be signed in to change notification settings

ottonemo/pytorch-sru

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyTorch SRU

This is just a independently packaged and properly interfaced SRU in PyTorch. The credits for main source code all belong @taolei87 (https://github.com/taolei87/sru).

This main difference between this package and the author's source code is that

  • Basic handling for PackedSequence inputs. However, if there are enough demands for it, further optimization code can be implemented to leverage packed data structures in CUDA-level.

  • Handling of variable length sequences in a mini-batch. The capability to handle PackedSequence also means that the underlying CUDA-level code must support variable sequence lengths in a mini-batch. Some basic codes have been modified to output only the last hidden state of each sequence (of variable lengths).

We plan to update this package as soon as the author puts out additional functionalities (layer normalization etc.)

About

SRU with length variable sequences (interfaces with PackedSequence)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 53.4%
  • Cuda 46.6%