I run the follow code before definition of modules. (My model uses Embeding, Dropout, LSTM, and Linear layers.)
torch.manual_seed(1000)
torch.backends.cudnn.enabled = False
torch.cuda.manual_seed(1000)

However, the final results are still different for each trial (regardless I use CPU or GPU). Are there any other things I should do to get the deterministic results given the same input?
Thanks.