(self, beam_size)
Repeat beam_size times along batch dimension.
Repeat beam_size times along batch dimension.
Repeat beam_size times along batch dimension .
def repeat_beam_size_times(self, beam_size):
        """ Repeat beam_size times along batch dimension. """
        vars = [e.data.repeat(1, beam_size, 1)
                for e in self._all]
        self.hidden = tuple(vars[:-1])
        self.input_feed = vars[-1]
def repeat_beam_size_times ( self , beam_size ) : vars = [ e . data . repeat ( 1 , beam_size , 1 ) for e in self . _all ] self . hidden = tuple ( vars [ : - 1 ] ) self . input_feed = vars [ - 1 ]