fix bug in reshape: (#20781)
fix bug in reshape: (#20781)

consider the situation that shape of input can contain more than one -1.
test=develop
luotao1/Paddle,chengduoZH/Paddle,luotao1/Paddle,luotao1/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,chengduoZH/Paddle,chengduoZH/Paddle,PaddlePaddle/Paddle,chengduoZH/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,chengduoZH/Paddle