fixed some problems in BeamSearch

2 jobs for rnn