Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What will happen if we set target shape from input in reshape_op #6587

Closed
kuke opened this issue Dec 13, 2017 · 1 comment
Closed

What will happen if we set target shape from input in reshape_op #6587

kuke opened this issue Dec 13, 2017 · 1 comment

Comments

@kuke
Copy link
Contributor

kuke commented Dec 13, 2017

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.

@Xreki
Copy link
Contributor

Xreki commented May 14, 2018

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.

@Xreki Xreki closed this as completed May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants