Skip to content
Snippets Groups Projects
Commit 5c3e38a5 authored by Tamino Huxohl's avatar Tamino Huxohl
Browse files

random search initializes all random seeds

parent 488452f2
No related branches found
No related tags found
No related merge requests found
...@@ -8,8 +8,9 @@ import shutil ...@@ -8,8 +8,9 @@ import shutil
import sys import sys
from typing import Any, Callable, Dict, List, Optional from typing import Any, Callable, Dict, List, Optional
import torch import numpy as np
import pandas as pd import pandas as pd
import torch
from mu_map.dataset.default import MuMapDataset from mu_map.dataset.default import MuMapDataset
from mu_map.dataset.patches import MuMapPatchDataset from mu_map.dataset.patches import MuMapPatchDataset
...@@ -289,6 +290,8 @@ class RandomSearchCGAN(RandomSearch): ...@@ -289,6 +290,8 @@ class RandomSearchCGAN(RandomSearch):
seed = random.randint(0, 2**32 - 1) seed = random.randint(0, 2**32 - 1)
random.seed(seed) random.seed(seed)
torch.manual_seed(args.seed)
np.random.seed(args.seed)
self.logger.info(f"Random seed for iteration {i} is {seed}") self.logger.info(f"Random seed for iteration {i} is {seed}")
self._setup_run(i) self._setup_run(i)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment