What will happen if we set target shape from input in reshape_op
This issue is related to #6533. Currently the target shape of reshape_op is set by attribute. If it is set by an input variable, then when run InferShape(), we cannot get the right shape for the output tensor because at this moment there is no avaiable value in the input variable. It means that the framework cannot infer the shape of tensors correctly after the reshape operation.
So I doubt if it is reasonable to set target shape via input under current design. Maybe we can turn to figure out another way to solve #6533, such as by dynamic attributes setting.
After this commit, users can set Shape of the target through both input and attribute. However, the priority of input Shape is higher than attribute shape.