WonwoongCho commited on
Commit
6950e9c
·
1 Parent(s): cf0a3d5

update app

Browse files
Files changed (1) hide show
  1. src/utils_sample.py +2 -0
src/utils_sample.py CHANGED
@@ -13,10 +13,12 @@ def set_seed(seed: int):
13
  random.seed(seed)
14
  np.random.seed(seed)
15
  torch.manual_seed(seed)
 
16
  torch.cuda.manual_seed_all(seed)
17
  torch.backends.cudnn.deterministic = True
18
  torch.backends.cudnn.benchmark = False
19
 
 
20
  def resize_and_center_crop(image, target_size=512):
21
  w, h = image.size
22
  scale = target_size / min(w, h)
 
13
  random.seed(seed)
14
  np.random.seed(seed)
15
  torch.manual_seed(seed)
16
+ torch.cuda.manual_seed(seed)
17
  torch.cuda.manual_seed_all(seed)
18
  torch.backends.cudnn.deterministic = True
19
  torch.backends.cudnn.benchmark = False
20
 
21
+
22
  def resize_and_center_crop(image, target_size=512):
23
  w, h = image.size
24
  scale = target_size / min(w, h)