Commit 0c6c568
pd: Ignore if branch of 0-size (#4617)
The support for higher-order differentiation and complex control flow in
`paddle.jit` static graphs is not very strong. Therefore, branches
related to 0-size are ignored to avoid accuracy issues during training.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved the consistency and stability of key computational processes
across the application, ensuring that data processing occurs reliably
under all conditions.
- Enhanced compatibility with the underlying execution framework,
leading to more predictable outcomes even in edge-case scenarios.
- Adjusted control flow for handling empty coordinate tensors, allowing
calculations to proceed under specific conditions.
- Modified conditions for executing operations on variables, ensuring
compatibility with the framework's operational modes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: HydrogenSulfate <490868991@qq.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent 80d445b commit 0c6c568
File tree
3 files changed
+11
-5
lines changed- deepmd/pd
- model
- descriptor
- network
- utils
3 files changed
+11
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
744 | 745 | | |
745 | 746 | | |
746 | 747 | | |
747 | | - | |
| 748 | + | |
| 749 | + | |
748 | 750 | | |
749 | 751 | | |
750 | 752 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
| 103 | + | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
100 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
| |||
240 | 243 | | |
241 | 244 | | |
242 | 245 | | |
243 | | - | |
| 246 | + | |
| 247 | + | |
244 | 248 | | |
245 | 249 | | |
246 | 250 | | |
| |||
0 commit comments