Hello all,
When computing mean and std on numpy or pytorch tensors, they yield different results. How come ?
rng = np.random.RandomState(1)
dataset1 = rng.uniform(low=-0.01, high=0.01, size=(1000, 20))
dataset2 = torch.from_numpy(data_numpy)
print(dataset1.mean(), dataset1.std())
print(dataset2.mean(), dataset2.std())
returns
2.5537095782416174e-05 0.005769608507668796
tensor(-3.14198780749532207562380037302319e-06, dtype=torch.float64) tensor(0.00576444647196127767790896356814, dtype=torch.float64)