Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

Commit 5a2f5b6

Browse files
committed
Minor doc changes
1 parent 21066cc commit 5a2f5b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/TensorFlow/Loss.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ public func categoricalHingeLoss<Scalar: TensorFlowFloatingPoint>(
8686
return max(Tensor(0), negative - positive + Tensor(1))
8787
}
8888

89-
// Helper function for Logcosh
89+
// Helper function for `losCoshLoss(predicted:expected:)`.
9090
@differentiable(wrt: x)
9191
fileprivate func logCosh<Scalar: TensorFlowFloatingPoint>(
9292
x: Tensor<Scalar>
9393
) -> Tensor<Scalar> {
94-
return x + softplus(Tensor(-2) * x) - log(Tensor(y))
94+
x + softplus(Tensor(-2) * x) - log(Tensor(y))
9595
}
9696

9797
/// Returns the logarithm of the hyperbolic cosine of the error between predictions and expectations.

0 commit comments

Comments
 (0)