I added:
torch.backends.cudnn.deterministic = True       in addition to:
torch.manual_seed(999)         and
if torch.cuda.is_available(): torch.cuda.manual_seed_all(999)
but accuracy for same model/same data still varies considerably across runs. I’ve even tried duplicating the above in the code and even tried switching to the latest version of pytorch (3.1) but still getting the same variability in accuracy across runs for same model/same data. Weird.