-
Notifications
You must be signed in to change notification settings - Fork 41
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
Implement custom MeanLayer in nn_ensemble #500
Conversation
Codecov Report
@@ Coverage Diff @@
## master #500 +/- ##
=======================================
Coverage 99.48% 99.48%
=======================================
Files 78 78
Lines 5669 5672 +3
=======================================
+ Hits 5640 5643 +3
Misses 29 29
Continue to review full report at Codecov.
|
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
I tested this in a situation where Python 3.6 is used for training models and Python 3.8 for using them. The PR seems to improve compatibility between Python versions for NN ensemble projects, but both instances need to run the updated code. First I shamelessly copied the minimal setup from #453:
Without this PR, the
With this PR applied, it works without problems. I also tested the case of old models trained without this PR. They still keep working with the PR applied. So this PR doesn't break compatibility for old NN ensemble projects, but projects will have to be retrained to be able to benefit from the additional compatibility this PR offers. |
Like above I tested training models on Python 3.7 and using them on 3.9: without this PR the |
This PR replaces the Lambda layer with a custom MeanLayer in the nn_ensemble backend. It was intended as a fix to the CustomMaskWarning error encountered in PR #499 (upgrade to TensorFlow 2.5.0) but it turned out that the problem is unrelated.
This might still be a good idea, for example it could improve the compatibility of saved nn_ensemble models between Python versions. But it needs more testing so I'm leaving this as a draft PR.