forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 1
[tmva][sofie] New SOFIE Keras Parser - Fixing Conv2D test failures #30
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
Open
PrasannaKasar
wants to merge
15
commits into
lmoneta:tmva_sofie_keras_parser_prasanna
Choose a base branch
from
PrasannaKasar:sofie-keras-parser
base: tmva_sofie_keras_parser_prasanna
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[tmva][sofie] New SOFIE Keras Parser - Fixing Conv2D test failures #30
PrasannaKasar
wants to merge
15
commits into
lmoneta:tmva_sofie_keras_parser_prasanna
from
PrasannaKasar:sofie-keras-parser
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ers and added tests for them. Imported Keras within the required functions. Created new CMakeLists.txt file for the keras parser. Made changes in the pythonization CMake file to build the keras parser files
…aced import keras_version with get_keras_version and called it in necessary files
… directory. Used import numpy statements within the parser functions to avoid slowing down the import of ROOT.
Do not use anymore .h5 files but .keras since .h5 is not anymore supported in keras3
the algorithm option is not anymore supported from scikit versions 1.6 Remove it in the MethodAdaBoost The SOFIE tutorials which require pymva need also a valid Keras parser, so exclude them if Keras is an unsupported version
… Keras3 Sequential In Keras3 Sequential output of a layer can have a different name than input of the next layer. Since in sequnrial model each layer has a single input/output use as output names the layer name (which is unique) and set as input name for the next layer
…d C++ parser - use new python keras parser for parsing a model into SOFIE. Since new parser is only Python base, move some tutorials from C++ to Python Remove also tutorial dependency on TMVA_Higgs_Classification by creating and training a model in tutorial TMVA_SOFIE_Keras_HiggsModel.py Adapt also RSofieReader for using new Python Keras parser
…ndency to test Fix also an issue in a SOFIE tutorial
…ils to train, it's test will be skipped. If model's file path is not found, the test will be skipped. Enabled Conv2d and GlobalAveragePooling2d tests
9a9c216 to
4c24c9a
Compare
9aa6e2a to
cc7d91d
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This Pull request:
This pull request implements fixes during testing the New SOFIE Keras Parser.
The tests included Functional and Sequential models which comprised of
Conv2D,GlobalAveragePool2DandAveragePool2Dfor which Keras doesn't yet supportchannels_firstparameter while training it on CPU, on platforms such as mac beta 26, mac 14 and 15. Note that this error is generated during the training phase of the models and not while testing the models. There seems to be no fix for this but to usechannels_lastparameter during training. Since only some of the platforms face these issues, there's no need to disable the tests completely. I'll create an issue on Keras repository as well mentioning this and will add it in this PR as a reference.Changes or fixes:
During the training of these types of models we'll use a
try-exceptblock and check if there's any error generated during training, it would print a statement saying "Error while traning the keras model". While generating the inference code we'll then see if the model file exists, if not skip the test. Though this works, it makes the tests fail silently.Checklist:
This PR fixes #