Despite the implication (because of the use of shape suffix B) in the `tensor_gen.py` module, the BeamSearchOptimized does not work correctly if more than one target is provided in a batch. This is a known and fundamental limitation of the algorithm/logic used in BeamSearchOptimized.