Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A PyTorch Implementation of "Quasi-Recurrent Neural Networks"

NotificationsYou must be signed in to change notification settings

jayparks/quasi-rnn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pytorch implementation of Neural Machine Translation using"Quasi-Recurrent Neural Networks", ICLR 2017

Requirements

  • NumPy >= 1.11.1
  • Pytorch >= 0.2.0

Usage Instructions

Codes

  • layer.py : Implementation of the quasi-recurrent layer
  • model.py: Implementation of the Encoder-Decoder model using qrnn layer
  • train.py: Code to train a NMT model
  • decode.py: Code to translate a source file using a trained model

Training

To train a quasi-rnn NMT model,

$pythontrain.py --kernel_size3 \                  --hidden_size640 \                  --emb_size500 \                  --num_enc_symbols30000 \                  --num_dec_symbols30000 ...

Decoding

To run the trained model for translation,

$pythoneval.py  --model_path $path_to_model \                  --decode_input $path_to_source \                  --decode_output $path_to_output                  --max_decode_step300 \                  --batch_size30 ...

For simplicity, we used greedy decoding at each time step, not the beam search decoding.

Notes

For more in-depth exploration, QRNN API for Pytorch is available:https://github.com/salesforce/pytorch-qrnn

For any comments and feedbacks, please email me atpjh0308@gmail.com or open an issue here.

About

A PyTorch Implementation of "Quasi-Recurrent Neural Networks"

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp