(self, other: Variable)
| 72 | return result |
| 73 | |
| 74 | def __sub__(self, other: Variable) -> Variable: |
| 75 | result = Variable(self.value - other.value) |
| 76 | |
| 77 | with GradientTracker() as tracker: |
| 78 | # if tracker is enabled, computation graph will be updated |
| 79 | if tracker.enabled: |
| 80 | tracker.append(OpType.SUB, params=[self, other], output=result) |
| 81 | return result |
| 82 | |
| 83 | def __mul__(self, other: Variable) -> Variable: |
| 84 | result = Variable(self.value * other.value) |
nothing calls this directly
no test coverage detected