项目作者: nauhc

项目描述 :
biLSTM model with the attention mechanism. Example of prediction/inferencing included.
高级语言: Python
项目地址: git://github.com/nauhc/biLSTM-many-to-one.git
创建时间: 2020-06-29T02:32:07Z
项目社区:https://github.com/nauhc/biLSTM-many-to-one

开源协议:MIT License

下载


Issues
MIT License




biLSTM_many_to_one




Providing an biLSTM many-to-one model (PyTorch) with attention mechanism


Inference with pretrained biLSTM model for sequence predictions






·
Report Bug
·
Request Feature


Table of Contents

About The Project

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.

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • Python 3 (Python 2 is no longer supported by the Python Software Foundation.)
  • PyTorch
  • Numpy

Installation

  1. git clone https://github.com/nauhc/biLSTM-many-to-one.git

Usage

  1. Clone the repo to your local directory
  2. 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
  3. Ready to go! Run the main.py and see the predition results!

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.