-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Hello,
I have observed that the randomness in your code is being modified. Specifically, the rand_like function seems to be altering the random state. Please see the code below for reference.
import torch
from transformers import set_seed
set_seed(42)
random_tensor = torch.randn_like(torch.zeros(5))
another_random_tensor = torch.randn_like(torch.zeros(5))
print(random_tensor)
print(another_random_tensor)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels