Commit 0b6c675
Supporting models with required training arg in call
Summary:
Support keras models with call signatures which have no default value for the `training` parameter.
These are supported in upstream keras models by checking the model's call signature and passing False if the argument is required but has not been passed.
TF2.5 Only
Test Plan:
Added a test which checks that you can call build/fit/evaluate/predict on models with a required training parameter.
Added a test which checks that you get an appropriate error message when call requires other extra arguments.
Reviewers: #tensorflow, #framework_ip_review_-_any_oss_or_third-party_code_use_has_been_approved, georgep
Reviewed By: #tensorflow, #framework_ip_review_-_any_oss_or_third-party_code_use_has_been_approved, georgep
Maniphest Tasks: T57217
Differential Revision: https://phabricator.sourcevertex.net/D621001 parent db3d683 commit 0b6c675
File tree
2 files changed
+48
-1
lines changed- tensorflow/python/ipu
- keras/extensions
- tests/keras/extensions/single_ipu
2 files changed
+48
-1
lines changedLines changed: 14 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
| |||
547 | 548 | | |
548 | 549 | | |
549 | 550 | | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
550 | 563 | | |
551 | 564 | | |
552 | 565 | | |
| |||
567 | 580 | | |
568 | 581 | | |
569 | 582 | | |
570 | | - | |
| 583 | + | |
571 | 584 | | |
572 | 585 | | |
573 | 586 | | |
| |||
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
573 | 607 | | |
574 | 608 | | |
575 | 609 | | |
| |||
0 commit comments