def Advance(state, step, scores_array, alive, alive_steps, *features): scores = self._BuildNetwork(features, return_average=use_average)['logits'] scores_array = scores_array.write(step, scores) features, state, alive = ( gen_parser_ops.beam_parser(state, scores, self._feature_size)) return [state, step + 1, scores_array, alive, alive_steps + tf.cast( alive, tf.int32)] + list(features)