laurencecao / PyTorch-Beam-Search-Decoding

PyTorch implementation of beam search decoding for seq2seq models

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyTorch-Beam-Search

PyTorch implementation of beam search decoding for seq2seq models based on https://github.com/shawnwun/NNDIAL. Decoding goes seperately for each sentence and stores the nodes in prioritized queue.

Usage: You can specify additional reward for decoding through BeamSearchNode.eval. Works for model with and without attention.

About

PyTorch implementation of beam search decoding for seq2seq models

License:Apache License 2.0


Languages

Language:Python 100.0%