mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-23 16:46:50 +08:00
update: format code
This commit is contained in:
parent
989e8bab66
commit
b3c1aaafd2
@ -223,12 +223,14 @@ def relu6(x):
|
||||
y = nn.relu6(y)
|
||||
mx.eval(y)
|
||||
|
||||
|
||||
def relu_squared(x):
|
||||
y = x
|
||||
for i in range(100):
|
||||
y = nn.relu_squared(y)
|
||||
mx.eval(y)
|
||||
|
||||
|
||||
def softplus(x):
|
||||
y = x
|
||||
for i in range(100):
|
||||
|
@ -156,6 +156,7 @@ def relu6(x):
|
||||
y = torch.nn.functional.relu6(y)
|
||||
sync_if_needed(x)
|
||||
|
||||
|
||||
@torch.no_grad()
|
||||
def relu_squared(x):
|
||||
y = x
|
||||
@ -164,6 +165,7 @@ def relu_squared(x):
|
||||
y = torch.square(y)
|
||||
sync_if_needed(x)
|
||||
|
||||
|
||||
@torch.no_grad()
|
||||
def softplus(x):
|
||||
y = x
|
||||
|
Loading…
Reference in New Issue
Block a user