I am using torch.manual_seed to fix the generator but it is giving different values at different runs unless I manually declare it before every run. One of the example run is,

torch.manual_seed(10)
d = torch.randn(4)
e = torch.randn(4)
print(d,e)
torch.manual_seed(10)
e = torch.randn(4)
print(d,e)

The output is,
tensor([-0.6014, -1.0122, -0.3023, -1.2277]) tensor([ 0.9198, -0.3485, -0.8692, -0.9582])
tensor([-0.6014, -1.0122, -0.3023, -1.2277]) tensor([-0.6014, -1.0122, -0.3023, -1.2277])