-
Notifications
You must be signed in to change notification settings - Fork 462
New config_from_keras_model #690
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
Conversation
For the test that fail, i think it's related to this error from the keras model conversion step, which happens when we try to
It's weird because |
I confirmed that this works in our use of extension API (after removing the unused config). Let me look once more, but I think this is a good change. |
Let see the tests finish, but if people don't object, I think we can merge this PR. In general, though, I would prefer more documentation on the attributes, what are the common attributes for different categories, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks great, and my initial testing works. I have some minor questions.
Assuming the CI looks good, I'll merge this later today, unless someone objects. |
Wait, we need to do the pre-commit stuff. I'm working on it, but there are A LOT of issues. |
My understanding from @jmduarte was that it would automatically format things, so you don't need to manually do it, though I am not 100% sure. |
some are fixed automatically (black formatting, isort sorting imports, etc.), some are not (flake8 issues). @vloncar is fixing (most) of the remaining issues now, and i will take a look at the rest, then we can merge |
I fixed all of the issues from flake8, but I cheated a bit by ignoring the print statement warnings. |
* Don't set duplicate attributes * Expand the use of backend-specific attributes * Reorganize attributes a bit to remove duplicates * Move string conversion utilities to new module * Remove unnecessary init for activation attributes * New config_from_keras_model function * Remove config from parsers (no converters use it) * Save activation's quantizer config in the parser * Use keras parsing fn to build the initial config * Lowercase 'trace' attribute (removes duplicate) * Fix tests that fail due to config update * Update Jenkinsfile * Use ChoiceAttribute for convolution strategy * Try loading a different libdl.so on newer Linux boxes * Fix test output dirs * To future self: I'm sorry for this, but it was necessary * black + isort compatability Co-authored-by: Javier Duarte <[email protected]>
Description
This PR introduces the new
config_from_keras_model
function that fixes the shortcomings of the old one, namely the need to keep in sync the supported layers and their configurable attributes. It relies on the attribute system to automatically discover tunable attributes of each layer and include them in the config. Config is now more expressive, and includes backend-specific parameters.Type of change
For a new feature or function, please create an issue first to discuss it
with us before submitting a pull request.
Note: Please delete options that are not relevant.
Tests
Current tests should suffice
Checklist
pre-commit
on the files I edited or added. -> As discussed, this will be done after review