Skip to content

Commit

Permalink
Remove 0 epsilon (#7883)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pforderique authored Jul 31, 2023
1 parent 4e7d5f6 commit 5974699
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tfjs-layers/src/layers/nlp/utils_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('sliceUpdate', () => {

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

expectTensorsClose(result, expected, 0);
expectTensorsClose(result, expected);
});

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

expectTensorsClose(result, expected, 0);
expectTensorsClose(result, expected);
});

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

expectTensorsClose(result, expected, 0);
expectTensorsClose(result, expected);
});
});

0 comments on commit 5974699

Please sign in to comment.