Skip to content

Commit 5974699

Browse files
authored
Remove 0 epsilon (#7883)
After discussion with @Linchenn, I found out that using a zero-value epsilon in expectTensorsClose causes some tests for devices with low precision to fail. This PR changes the tests to use the default epsilon value.
1 parent 4e7d5f6 commit 5974699

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tfjs-layers/src/layers/nlp/utils_test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('sliceUpdate', () => {
5151

5252
const result = sliceUpdate(inputs, startIndices, updates);
5353

54-
expectTensorsClose(result, expected, 0);
54+
expectTensorsClose(result, expected);
5555
});
5656

5757
it('2D', () => {
@@ -67,7 +67,7 @@ describe('sliceUpdate', () => {
6767
]);
6868
const result = sliceUpdate(inputs, startIndices, updates);
6969

70-
expectTensorsClose(result, expected, 0);
70+
expectTensorsClose(result, expected);
7171
});
7272

7373
it('3D', () => {
@@ -84,6 +84,6 @@ describe('sliceUpdate', () => {
8484
]);
8585
const result = sliceUpdate(inputs, startIndices, updates);
8686

87-
expectTensorsClose(result, expected, 0);
87+
expectTensorsClose(result, expected);
8888
});
8989
});

0 commit comments

Comments
 (0)