Skip to content

Commit d22e827

Browse files
authored
minor fixes (#19572)
1 parent 27db4c3 commit d22e827

File tree

1 file changed

+2
-2
lines changed
  • keras/src/backend/mlx

1 file changed

+2
-2
lines changed

keras/src/backend/mlx/nn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def silu(x, beta=1.0):
4848

4949
def log_sigmoid(x):
5050
x = convert_to_tensor(x)
51-
return mx.log_sigmoid(x)
51+
return nn.log_sigmoid(x)
5252

5353

5454
def leaky_relu(x, negative_slope=0.2):
@@ -267,7 +267,7 @@ def binary_crossentropy(target, output, from_logits=False):
267267
)
268268

269269
if from_logits:
270-
return nn.binary_cross_entropy(output, target, reduction="none")
270+
return nn.losses.binary_cross_entropy(output, target, reduction="none")
271271
else:
272272
output = mx.minimum(mx.maximum(output, epsilon()), 1 - epsilon())
273273
return -target * mx.log(output) - (1 - target) * mx.log(1 - output)

0 commit comments

Comments
 (0)