Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

OnnxAttributes type conversion is error prone #35

Open
ezyang opened this issue Oct 5, 2017 · 0 comments
Open

OnnxAttributes type conversion is error prone #35

ezyang opened this issue Oct 5, 2017 · 0 comments

Comments

@ezyang
Copy link
Collaborator

ezyang commented Oct 5, 2017

The OnnxAttributes helper class that I wrote suffers the problem that it uses exactly the type of the attribute value to decide whether or not to write out f or i attribute protos. I don't know if Caffe2 will accept an i anywhere a f is expected, but if it does not, then this leads to the very real danger that someone writes a literal like 1 or 2, expecting it to "just work", but actually the underlying attribute required floats.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant