autodiff.reverse.Node.__lt__¶
- Node.__lt__(other)¶
Return element-wise (value and derivative) less than comparison of self and other.
- Parameters
- selfNode
- otherint, float, Node
- Returns
- outtuple
Notes
If either other or self has None der. We return None for the derivative comparison and give user a warning indicating that they are attempting to compare two Nodes before their derivatives are computed.
Examples
>>> ad.Node.constant(42) < ad.Node.constant(5) (False, False) >>> ad.Node.constant(42) < ad.Node.constant(50) (True, False)
Warning before derivatives are computed:
>>> ad.Node(42) < 5 RuntimeWarning: Attempting to compare two nodes with None derivatives (False, None)