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

Commit cc648b0

Browse files
committed
Removing argument labels acc to swift docs
1 parent db478bd commit cc648b0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/TensorFlow/Loss.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,13 @@ public func hingeLoss<Scalar: TensorFlowFloatingPoint>(
103103
}
104104

105105
/// Returns the cosine similarity between predictions and expectations.
106+
///
107+
/// - Parameters:
108+
/// - predicted: Predicted outputs from a neural network.
109+
/// - expected: Expected values, i.e. targets, that correspond to the correct output.
106110
@differentiable(wrt: (predicted, expected))
107111
public func cosineSimilarity<Scalar: TensorFlowFloatingPoint>(
108-
predicted: Tensor<Scalar>, expected: Tensor<Scalar>
112+
_ predicted: Tensor<Scalar>, _ expected: Tensor<Scalar>
109113
) -> Tensor<Scalar> {
110114
return -(expected * predicted).sum() /
111115
(sqrt(expected.squared().sum()) * sqrt(predicted.squared().sum()))

0 commit comments

Comments
 (0)