Added infer_shape to choose function and deleted the out input.