Skip to content

Instantly share code, notes, and snippets.

View successren's full-sized avatar

successren successren

View GitHub Profile
@yjchun
yjchun / rnn_t_beamsearch.py
Last active September 9, 2021 04:11
rnn transducer inference beam search
import math
import numpy
import torch
import torch.nn as nn
import torch.nn.functional as F
import itertools
class BeamSearch(object):
def __init__(self, model, henc):