Skip to content

Commit

Permalink
add the random seed to a common spot
Browse files Browse the repository at this point in the history
  • Loading branch information
marph91 committed Mar 25, 2021
1 parent b923ce5 commit e4008b2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions sim/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import random

from test_utils.extra_libs import analyze_json, analyze_util, analyze_window_ctrl_lib

Expand All @@ -10,6 +11,9 @@
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" # ERROR


random.seed(42)


def pytest_addoption(parser):
parser.addoption("--waves", action="store_true", help="Record the waveform.")

Expand Down
2 changes: 0 additions & 2 deletions sim/test_window_convolution_activation.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
get_files,
)

random.seed(100) # TODO: fixture


def tensor_to_list(tensor):
return list(tensor.numpy().astype("uint8").flat)
Expand Down
2 changes: 0 additions & 2 deletions sim/test_window_maximum_pooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from test_utils.cocotb_helpers import ImageMonitor, Tick
from test_utils.general import concatenate_channel, get_files

random.seed(100) # TODO: fixture


@cocotb.test()
async def run_test(dut):
Expand Down

0 comments on commit e4008b2

Please sign in to comment.