Although I set the np.raandom.seed() value to a constant value I get different error rates everytime I run the learn.fit_one_cycle(5,max_lr=slice(1e-03,1e-02)).Isn’t this suppose to give the same error rate everytime I run this function .Please help
Thanks
np.random.seed(seed)
torch.manual_seed(seed)
gpu = 0
torch.cuda.set_device(gpu)
cudnn.benchmark = True
cudnn.enabled=True
torch.cuda.manual_seed_all(seed)
Have you tried add those above?
1 Like
Will surely try this.Thanks.
But can you please touch on why were the error_rates different without typing the codes mentioned by you?
np.random.seed only deals with numpy. There is also randomness in pytorch (which fastai is built on). You can read more at https://pytorch.org/docs/stable/notes/randomness.html
1 Like