(self, other: Variable)
| 63 | return self.value |
| 64 | |
| 65 | def __add__(self, other: Variable) -> Variable: |
| 66 | result = Variable(self.value + other.value) |
| 67 | |
| 68 | with GradientTracker() as tracker: |
| 69 | # if tracker is enabled, computation graph will be updated |
| 70 | if tracker.enabled: |
| 71 | tracker.append(OpType.ADD, params=[self, other], output=result) |
| 72 | return result |
| 73 | |
| 74 | def __sub__(self, other: Variable) -> Variable: |
| 75 | result = Variable(self.value - other.value) |
nothing calls this directly
no test coverage detected