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

Commit 56ac099

Browse files
committed
Updating test to mathtests
1 parent de17554 commit 56ac099

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Tests/TensorFlowTests/OperatorTests/MathTests.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,8 @@ final class MathOperatorTests: XCTestCase {
6868
func testCosineSimilarity() {
6969
let x = Tensor<Float>([1, 2, 3, 4, 5, 6, 7, 8])
7070
let y = Tensor<Float>([0.5, 1, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0])
71-
let loss = cosineSimilarity(x, y)
72-
let expectedLoss: Float = -1.0
73-
assertElementsEqual(expected: Tensor(expectedLoss), actual: loss)
71+
let z = cosineSimilarity(x, y)
72+
XCTassertEqual(z, 1.0)
7473
}
7574

7675
// FIXME(https://bugs.swift.org/browse/TF-543): Disable failing test.

0 commit comments

Comments
 (0)