Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for torch.nn.LSTM and torch.nn.LSTMCell Modules #93

Open
coreylammie opened this issue Sep 15, 2021 · 2 comments
Open

Add Support for torch.nn.LSTM and torch.nn.LSTMCell Modules #93

coreylammie opened this issue Sep 15, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@coreylammie
Copy link
Owner

coreylammie commented Sep 15, 2021

Support should be added for torch.nn.LSTM and torch.nn.LSTMCell modules.

@coreylammie coreylammie self-assigned this Sep 15, 2021
@coreylammie coreylammie added the enhancement New feature or request label Sep 15, 2021
@frmar440
Copy link

Hi! Has the implementation of LSTM modules been started?

@coreylammie
Copy link
Owner Author

Hi @frmar440,

I have implemented the base code/logic for a RNN module here: https://github.com/coreylammie/MemTorch/blob/master/memtorch/mn/RNN.py. Although currently, only legacy forward passes are currently enabled, it should be fairly straight forward to extend support for LSTM modules.

The required forward pass for both RNN and LSTM modules can be implemented similarly to as done here for linear layers. The code/logic above (i.e., https://github.com/coreylammie/MemTorch/blob/master/memtorch/mn/RNN.py) deconstructs the inference routine of a RNN to a set of Vector Matrix Multiplications (VMMs), which can be performed in-memory, and other supporting operations/logic.

Please let me know if you have any further questions! If someone is able to work on adding this support, I'm more than happy to help out where possible.

Kind Regards,

Corey.

@coreylammie coreylammie changed the title Add Support for torch.nn.LTSM and torch.nn.LTSMCell Modules Add Support for torch.nn.LSTM and torch.nn.LSTMCell Modules Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants