Providing an biLSTM many-to-one model (PyTorch) with attention mechanism
Inference with pretrained biLSTM model for sequence predictions
·
Report Bug
·
Request Feature
- About the Project
- Getting Started
- Usage
- Roadmap
- Contributing
This repo provides an biLSTM many-to-one model implemented in PyTorch. An wrapper program for predictions/inferences using a trained biLSTM is also included. The result returns the probabilities of each class.
To get a local copy up and running follow these simple steps.
- Python 3 (Python 2 is no longer supported by the Python Software Foundation.)
- PyTorch
- Numpy
git clone https://github.com/nauhc/biLSTM-many-to-one.git
- Clone the repo to your local directory
- If using the example in main.py:
- Add the pre-trained biLSTM model to the root directory: create a 'model' directory and put pretrained models inside
- Add data for inference: create a 'data' directory, and put data (numpy format) inside
- Change the [time, epoch, accuracy] parameter in main.py to specify a particular model
- Change the parameters in rnn/parameter.py if trained using alternative parameters
- Ready to go! Run the main.py and see the predition results!
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See
LICENSE
for more information.