| 617 | } |
| 618 | |
| 619 | void LeakyReluConstraint::eliminateVariable( __attribute__( ( unused ) ) unsigned variable, |
| 620 | __attribute__( ( unused ) ) double fixedValue ) |
| 621 | { |
| 622 | ASSERT( participatingVariable( variable ) ); |
| 623 | DEBUG( { |
| 624 | if ( variable == _f || variable == _b ) |
| 625 | { |
| 626 | if ( FloatUtils::gt( fixedValue, 0 ) ) |
| 627 | { |
| 628 | ASSERT( _phaseStatus != RELU_PHASE_INACTIVE ); |
| 629 | } |
| 630 | else if ( FloatUtils::lt( fixedValue, 0 ) ) |
| 631 | { |
| 632 | ASSERT( _phaseStatus != RELU_PHASE_ACTIVE ); |
| 633 | } |
| 634 | } |
| 635 | else if ( variable == _activeAux ) |
| 636 | { |
| 637 | if ( FloatUtils::isPositive( fixedValue ) ) |
| 638 | { |
| 639 | ASSERT( _phaseStatus != RELU_PHASE_ACTIVE ); |
| 640 | } |
| 641 | } |
| 642 | else |
| 643 | { |
| 644 | // This is the inactive aux variable |
| 645 | if ( FloatUtils::isPositive( fixedValue ) ) |
| 646 | { |
| 647 | ASSERT( _phaseStatus != RELU_PHASE_INACTIVE ); |
| 648 | } |
| 649 | } |
| 650 | } ); |
| 651 | |
| 652 | // In a Leaky ReLU constraint, if a variable is removed the entire constraint can be discarded. |
| 653 | _haveEliminatedVariables = true; |
| 654 | } |
| 655 | |
| 656 | bool LeakyReluConstraint::constraintObsolete() const |
| 657 | { |
nothing calls this directly
no outgoing calls
no test coverage detected