'Initializes the beam search.
Args:
predict:
A function that takes a `sample` and a `state`. It then performs
the computation on the last word in `sample`.
initial_state:
The initial state of the RNN.
prime_labels:
A list of labels corresponding to the priming text. This must
not be empty.'

def __init__(self, predict, initial_state, prime_labels):

    if (not prime_labels):
        raise ValueError('prime_labels    must    be    a    non-empty    list.')
    self.predict = predict
    self.initial_state = initial_state
    self.prime_labels = prime_labels
