Continuing the discussion from GNNExplainer import:
Hi @mufeili 've been trying to explain some models using the advise from the discussion above and I see that every time I get slightly different results. I don’t know where this stochasticity is coming from but would it be possible to pass a seed or something in order to make it at least reproducible? I’ve tried running this before running the code but the issue persists :
import os import random seed = 42 os.environ['PYTHONHASHSEED'] = str(seed) # Torch RNG torch.manual_seed(seed) torch.cuda.manual_seed(seed) torch.cuda.manual_seed_all(seed) # Python RNG np.random.seed(seed) random.seed(seed)
I see from the source code here that torch.randn is used to initialise the masks. I believe that torch.manual_seed should solve the issue but it doesn’t. Any hint? Thanks!