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

Handle operators with no input (eg Constant) #131

Closed
owulveryck opened this issue Sep 18, 2019 · 3 comments
Closed

Handle operators with no input (eg Constant) #131

owulveryck opened this issue Sep 18, 2019 · 3 comments

Comments

@owulveryck
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The #116 raises an error because some operators, such as Constant do not have any input

Describe the solution you'd like
While decoding the graph in the core package, if an operator does not have any input, create a dummy node that will hold the backend of the current operator (same type, same shape).
It is the responsibility of the backend to reuse the data of the node to spare some memory.

Describe alternatives you've considered
For the constant operator, the operator could be turned into an initializer; but the problem would remain for other operators such as RandomUniform and RandomNormal

Additional context
cf Issue 2274 in the core onnx project.

@owulveryck
Copy link
Contributor Author

branch #131 will follow the implementation

@owulveryck
Copy link
Contributor Author

owulveryck commented Sep 18, 2019

By now, the branch contains a basic implementation and a test. The implementation is creating a new ValueInfoProto when a node with zero input is detected while parsing.

@mattn maybe you can use this branch and merge your PR in it to see if it works?

@owulveryck
Copy link
Contributor Author

All fixed and merged

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

1 participant