paddle.infer output multiple outputs
Created by: pengwangucla
For paddle api v2,
The infer is only for a single output:
gen_result=paddle.infer(
output_layer=beam_gen,
parameters=parameters,
input=gen_data,
field=['id', 'value'])
Even for multiple fields, what should I do if I want to simultaneously obtain multiple outputs from layer1 and layer2, is it possible to upgrade the function as
gen_result=paddle.infer(
output_layer=[beam_gen1, beam_gen2],
parameters=parameters,
input=gen_data,
field=['id', 'value'])
Also set the gen results to be a list.
@reyoung @luotao1