From a1df21b00f9d3ecfce1329fef55af11f406c16a8 Mon Sep 17 00:00:00 2001 From: Cysu Date: Mon, 28 Aug 2017 17:48:15 +0800 Subject: [PATCH] torch.manual_seed also seeds all CUDA devices --- examples/oim_loss.py | 1 - examples/softmax_loss.py | 1 - examples/triplet_loss.py | 1 - 3 files changed, 3 deletions(-) diff --git a/examples/oim_loss.py b/examples/oim_loss.py index 8287c57..421c49b 100644 --- a/examples/oim_loss.py +++ b/examples/oim_loss.py @@ -71,7 +71,6 @@ def get_data(name, split_id, data_dir, height, width, batch_size, workers, def main(args): np.random.seed(args.seed) torch.manual_seed(args.seed) - torch.cuda.manual_seed_all(args.seed) cudnn.benchmark = True # Redirect print to both console and log file diff --git a/examples/softmax_loss.py b/examples/softmax_loss.py index 2fae40a..2e2a8d1 100644 --- a/examples/softmax_loss.py +++ b/examples/softmax_loss.py @@ -70,7 +70,6 @@ def get_data(name, split_id, data_dir, height, width, batch_size, workers, def main(args): np.random.seed(args.seed) torch.manual_seed(args.seed) - torch.cuda.manual_seed_all(args.seed) cudnn.benchmark = True # Redirect print to both console and log file diff --git a/examples/triplet_loss.py b/examples/triplet_loss.py index 7c94315..758a2b9 100644 --- a/examples/triplet_loss.py +++ b/examples/triplet_loss.py @@ -73,7 +73,6 @@ def get_data(name, split_id, data_dir, height, width, batch_size, num_instances, def main(args): np.random.seed(args.seed) torch.manual_seed(args.seed) - torch.cuda.manual_seed_all(args.seed) cudnn.benchmark = True # Redirect print to both console and log file