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

Support for Tensorflow 2.17 #11

Merged
merged 16 commits into from
Feb 26, 2025
Merged

Support for Tensorflow 2.17 #11

merged 16 commits into from
Feb 26, 2025

Conversation

mhuen
Copy link
Collaborator

@mhuen mhuen commented Oct 22, 2024

Adds support for newest tensorflow version. This PR includes two updates:

  • Convert KerasVariable to tensor
  • fix eager execution for LR scheduler

@codecov-commenter
Copy link

codecov-commenter commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (master@f2d0832). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff            @@
##             master     #11   +/-   ##
========================================
  Coverage          ?   0.06%           
========================================
  Files             ?      32           
  Lines             ?    2929           
  Branches          ?     534           
========================================
  Hits              ?       2           
  Misses            ?    2927           
  Partials          ?       0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mhuen mhuen requested a review from pascalgutjahr October 22, 2024 18:02
@mhuen mhuen marked this pull request as draft October 23, 2024 18:39
@mhuen
Copy link
Collaborator Author

mhuen commented Oct 23, 2024

Note: while falling back to compat.v1 optimizers works, support for variable learning rates is lost that was previously available. The issue is that newer tensorflow optimizers utilize keras optimizers which do not return the update operation when calling the apply_gradients method.
A proper solution is to convert everything to TF2 instead of relying on tf.compat.v1 symbols. See also #7 . This requires and extensive rewrite though.

@mhuen
Copy link
Collaborator Author

mhuen commented Feb 25, 2025

tf.compat.v1 symbols are now removed and everything is updated to proper tensorflow 2 logic. This fixes issue #7 .
The documentation has now also been updated to reflect these changes. This PR will thus also resolve issues #3 and #4.

@mhuen mhuen marked this pull request as ready for review February 26, 2025 16:31
@mhuen mhuen merged commit 1d4e899 into master Feb 26, 2025
5 checks passed
@mhuen mhuen deleted the UpdateTensorflowVersion branch February 26, 2025 16:33
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

Successfully merging this pull request may close these issues.

2 participants