idiap / ESLAM

Apache License 2.0
204 stars 21 forks source link

Control random number seeds #18

Closed ZhaoCancanCN closed 5 months ago

ZhaoCancanCN commented 8 months ago

Thank you for your wonderful work,

and have you ever tried to control random number seeds to make the results reproducible? But I was trying to add random seeds and found that there was no guarantee that the output would be consistent every time. And I found that as long as the network performs a backpropagation, the output results at this time are already inconsistent. Do you know how to solve it?

Thank you!

def setup_seed(seed):
    torch.manual_seed(seed)
    torch.cuda.manual_seed_all(seed)
    np.random.seed(seed)
    random.seed(seed)
    torch.backends.cudnn.deterministic = True
    torch.backends.cudnn.benchmark = False
MohammadJohari commented 5 months ago

Hello,

Thank you very much for your interest in our work. Unfortunately, we did not try to force the initialization and optimization process to be deterministic. However, as evidenced in our experiments, our results are quite stable from run to run and we observe a small variance in localization and reconstruction accuracies.

Kind regards,