Skip to content

Small piece of code that allows creating Custom-LSTM easily like Conv-LSTM. This is useful, for example, when working with video/audio processing and wanting to apply convolutional operations instead of fully connected.

License

Notifications You must be signed in to change notification settings

adriaciurana/generalized-LSTM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generalized-LSTM

This small project enables the generalization of Long Short-Term Memory (LSTM) networks to other operations such as convolution. It proves useful when a custom operation is required and/or it is not feasible to use a fully-connected layer, allowing for a reduction in the number of operations.

Overview

LSTM networks are powerful for sequence modeling tasks, but sometimes it's necessary to extend their capabilities to other operations like convolution. This project provides a solution for such scenarios, enabling the integration of LSTM functionalities into a broader range of operations.

Key Features

  • Generalization: Extend LSTM capabilities to operations beyond sequence modeling.
  • Custom Operations: Use this project when a custom operation is needed.
  • Reduced Operations: Avoid the necessity of using a fully-connected layer, reducing the overall number of operations.

How to Use

  1. Clone the repository to your local machine.

    git clone https://github.com/adriaciurana/generalized-LSTM.git
  2. Follow the installation instructions in the provided documentation.

  3. Integrate the project into your existing codebase.

  4. Customize the operation as needed for your specific use case.

  5. Enjoy the flexibility of using LSTM functionalities in a broader context.

Requirements

  • Python 3.x
  • No extra dependencies

Example

from generalized_lstm import Conv2dLSTM

# Initialize the Conv2dLSTM
layer = Conv2dLSTM(3, 32, 3, num_layers=2).eval().to(device)

# Perform custom operations using the Conv2dLSTM object
result = layer(input_data)

# Continue with your specific application logic

Contributions

Contributions are welcome! If you have ideas for improvements or new features, feel free to submit a pull request.

License

This project is licensed under the MIT License.

About

Small piece of code that allows creating Custom-LSTM easily like Conv-LSTM. This is useful, for example, when working with video/audio processing and wanting to apply convolutional operations instead of fully connected.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages