Use_deterministic_algorithms - PyTorch Forums
discuss.pytorch.org › t › use-deterministicApr 18, 2021 · Hi, I use pytorch 1.7.1+cu110. I would like to use deterministic algorithm for debugging purposes and to increase reproducibility of my predictions. But when I call the algorithm, PyTorch complains that torch has no such attribute. Is it possible that this attribute was introduced after the version I currently use? See below: import torch torch.use_deterministic_algorithms(True) module ...
torch.use_deterministic_algorithms — PyTorch 1.10.1 documentation
pytorch.org › docs › stabletorch.use_deterministic_algorithms(mode) [source] Sets whether PyTorch operations must use “deterministic” algorithms. That is, algorithms which, given the same input, and when run on the same software and hardware, always produce the same output. When enabled, operations will use deterministic algorithms when available, and if only nondeterministic algorithms are available they will throw a RuntimeError when called.