Skip to content

Commit 5fdcb18

Browse files
authored
make test_activations less sensitive to random seed values (#1211)
1 parent 898d53d commit 5fdcb18

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/pytest/test_pytorch_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ def test_activations(activation_function, backend, io_type):
8080
model.eval()
8181

8282
X_input = np.random.rand(1)
83+
X_input = np.round(X_input * 2**10) * 2**-10 # make it an exact ap_fixed<16,6>
8384

8485
pytorch_prediction = model(torch.Tensor(X_input)).detach().numpy()
8586

0 commit comments

Comments
 (0)