Commit d3bbc20
Cover more cases of
* Created some tests that fail due to #1476
* Fixes 1476 and other ways to create a log1mexp
* Reimplemented logmexpm1_to_log1mexp by tracking expm1 and then looking through the clients
* Absorbed the rewrite log1pexp_to_softplus into the new rewrite for log1mexp
* Fixed bug where I forgot to check whether result of is_neg was None or not before proceeding
---------
Co-authored-by: Luca Citi <[email protected]>log1mexp stabilization (#1483)1 parent 6aeed97 commit d3bbc20
File tree
2 files changed
+48
-15
lines changed- pytensor/tensor/rewriting
- tests/tensor/rewriting
2 files changed
+48
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| |||
2999 | 3000 | | |
3000 | 3001 | | |
3001 | 3002 | | |
3002 | | - | |
3003 | | - | |
3004 | | - | |
3005 | | - | |
3006 | | - | |
3007 | | - | |
3008 | 3003 | | |
3009 | 3004 | | |
3010 | 3005 | | |
| |||
3016 | 3011 | | |
3017 | 3012 | | |
3018 | 3013 | | |
3019 | | - | |
3020 | 3014 | | |
3021 | 3015 | | |
3022 | 3016 | | |
| |||
3582 | 3576 | | |
3583 | 3577 | | |
3584 | 3578 | | |
3585 | | - | |
3586 | | - | |
3587 | | - | |
3588 | | - | |
3589 | | - | |
3590 | | - | |
| 3579 | + | |
| 3580 | + | |
| 3581 | + | |
| 3582 | + | |
| 3583 | + | |
| 3584 | + | |
| 3585 | + | |
| 3586 | + | |
| 3587 | + | |
| 3588 | + | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
| 3597 | + | |
| 3598 | + | |
| 3599 | + | |
| 3600 | + | |
| 3601 | + | |
| 3602 | + | |
| 3603 | + | |
| 3604 | + | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
3591 | 3613 | | |
3592 | 3614 | | |
3593 | 3615 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4438 | 4438 | | |
4439 | 4439 | | |
4440 | 4440 | | |
4441 | | - | |
| 4441 | + | |
| 4442 | + | |
| 4443 | + | |
| 4444 | + | |
| 4445 | + | |
4442 | 4446 | | |
4443 | 4447 | | |
4444 | 4448 | | |
4445 | | - | |
| 4449 | + | |
| 4450 | + | |
| 4451 | + | |
| 4452 | + | |
| 4453 | + | |
| 4454 | + | |
| 4455 | + | |
| 4456 | + | |
4446 | 4457 | | |
4447 | 4458 | | |
4448 | 4459 | | |
| |||
0 commit comments