Skip to content

Commit

Permalink
fix comment for Tensor.swish (#4604)
Browse files Browse the repository at this point in the history
bad string replacement when we changed `function.` to `F.`
  • Loading branch information
chenyuxyz committed May 15, 2024
1 parent cd4d7e1 commit 067ff71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tinygrad/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ def reciprocal(self): return F.Reciprocal.apply(self.cast(least_upper_float(self
def elu(self, alpha=1.0): return self.relu() - alpha*(1-self.exp()).relu()
def celu(self, alpha=1.0): return self.maximum(0) + (alpha * ((self / alpha).exp() - 1)).minimum(0)
def swish(self): return self * self.sigmoid()
def silu(self): return self.swish() # The SiLU function is also known as the swish F.
def silu(self): return self.swish() # The SiLU function is also known as the swish function.
def relu6(self): return self.relu() - (self-6).relu()
def hardswish(self): return self * (self+3).relu6() * (1/6)
def tanh(self): return 2.0 * ((2.0 * self).sigmoid()) - 1.0
Expand Down

0 comments on commit 067ff71

Please sign in to comment.