Intro

This is a framework for Attention based Sequence-to-Sequence (seq2seq) models implemented in PyTorch.
We appreciate any kind of feedback or contribution.

model

How To Use

from models.encoderRNN import EncoderRNN
from models.decoderRNN import DecoderRNN
from models.seq2seq import Seq2seq

encoder = EncoderRNN(
    in_features = in_features, 
    hidden_size = config.hidden_size, 
    dropout_p = config.dropout_p, 
    n_layers = config.encoder_layer_size, 
    bidirectional = bidirectional, 
    rnn_cell = 'gru'
)
decoder = DecoderRNN(
    class_num = class_num, 
    max_len = config.max_len, 
    hidden_size = config.hidden_size if bidirectional else config.hidden_size << 1,
    sos_id = SOS_token, 
    eos_id = EOS_token,
    n_layers = config.decoder_layer_size, 
    rnn_cell = 'gru', 
    dropout_p = config.dropout_p,
    use_attention = config.use_attention, 
    device = device, 
    use_beam_search = False, 
    k = 8
 )
 model = Seq2seq(encoder, decoder)

Installation

This project recommends Python 3.7 or higher.
I recommend creating a new virtual environment for this project (using virtualenv or conda).

Prerequisites

  • Numpy: pip install numpy (Refer here for problem installing Numpy).
  • PyTorch: Refer to PyTorch website to install the version w.r.t. your environment.

Troubleshoots and Contributing

If you have any questions, bug reports, and feature requests, please open an issue on Github.
or Contacts sh951011@gmail.com please.

I appreciate any kind of feedback or contribution. Feel free to proceed with small issues like bug fixes, documentation improvement. For major contributions and new features, please discuss with the collaborators in corresponding issues.

Code Style

I follow PEP-8 for code style. Especially the style of docstrings is important to generate documentation.

License

Copyright (c) 2020 sooftware

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.