I found the results of nn.Embeding is non-deterministic:
nn.Embedding(3, 2)(Variable(torch.LongTensor([0, 1, 2])))
Variable containing:
-0.3836 -0.2593
-2.2071 -0.5127
-0.3338 -0.8781
[torch.FloatTensor of size 3x2]
nn.Embedding(3, 2)(Variable(torch.LongTensor([0, 1, 2])))
Variable containing:
-0.9080  0.4435
0.1588 -0.4792
0.7375  0.5644
[torch.FloatTensor of size 3x2]
I’ve tried random seeding with:
random.seed(0)
np.random.seed(0)
torch.manual_seed(0)
But the results aren’t different. Aren’t they supposed to be deterministic?