-
Notifications
You must be signed in to change notification settings - Fork 19.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Porting TF fake_quant_with_min_max functions (#20641)
* QAT (squashed this time) (#1) * adds fake_quant_with_min_max functions from TF to keras3 * Addresses PR review comments * drops another type hint * swaps out if statements, change float() to ops.cast and adds fake_quant_with_min_max_vars function * fix missed if statement, adds gradient tests via main function for tf and torch * fix unbound variable error when not using torch or tf backend (#2) Refactor to use backend specific gradient functions in tests and merges logic into single function * More QAT function revisions (#3) This PR addresses review feedback to fix implementation and to move tests to using named_parameters rather than individual functions. * Qat revisions (#4) Adds axis param and fixes logic for per channel function * updated implementation * removed redundant functions
- Loading branch information
1 parent
e345cbd
commit 6557961
Showing
5 changed files
with
525 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.