Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

# Contributing Authors (alphabetical):
# Brandon Edwards (Intel)
# Patrick Foley (Intel)
# Sarthak Pati (University of Pennsylvania)
# Micah Sheller (Intel)

Expand Down Expand Up @@ -216,6 +217,18 @@ def __init_2(self,

self.device = device

# For experiment reproducability
seed = 42
np.random.seed(seed)
random.seed(42)
torch.use_deterministic_algorithms(True)
torch.manual_seed(seed)
if self.device != 'cpu':
torch.cuda.manual_seed_all(seed)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False


# FIXME: this puts priority for these values on data object over flplan. Is this correct?
if hasattr(data, 'n_classes') and data.n_classes is not None:
self.n_classes = data.n_classes
Expand Down