expose height and width in LayerOutput object in python layer
Created by: pengwangucla
It is not convenient to reshape the output from paddle.infer for any inter output
For example:
conv = paddle.layer.img_conv(...)
out = paddle.infer(output_layer=conv,
parameters=parameters,
input=test_data,
feeding={'image1': 0})
then I need to manually give the height and width for the 'out' in order to view it as a 4 D image tensor.
Is it possible to add height and width field in the LayerOutput object in paddle ? So the height and width of an output is automatically reshaped.
out = out.reshape((batchsize, conv.num_filters, conv.height, conv.width))
@jacquesqiao