Skip to content

Instantly share code, notes, and snippets.

@ahmedbesbes
Created May 7, 2022 10:22
Show Gist options
  • Save ahmedbesbes/046d155aab73c953b35277d42eaf1bbf to your computer and use it in GitHub Desktop.
Save ahmedbesbes/046d155aab73c953b35277d42eaf1bbf to your computer and use it in GitHub Desktop.
import random
import numpy as np
import torch
random.seed(seed)
torch.manual_seed(0)
np.random.seed(0)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment