Regarding reproducibility of the results. #1067
Answered
by
AndreaCossu
AdityaJainTD
asked this question in
Q&A
-
Hi, I have been training with different strategies (EWC, Replay, Hybrid). Often times the evaluation accuracy ranges from 88.xx - 92.xx for the same code without any changes applied to it. I have provided the seed value for the nc_benchmark function. Do I need to seed anything else to generate reproducible results? |
Beta Was this translation helpful? Give feedback.
Answered by
AndreaCossu
Jun 15, 2022
Replies: 1 comment 3 replies
-
In addition, try calling this function at the beginning of your main def set_seed(seed):
if seed is None:
return
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
np.random.seed(seed)
random.seed(seed)
if torch.cuda.is_available():
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.enabled = True
torch.backends.cudnn.benchmark = False |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
AdityaJainTD
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In addition, try calling this function at the beginning of your main