Solved by Karoly_Poka in post #3 
              
              
                Thank you for the tip it solved my problem! Yes with torch.set_deterministic(True) I’ve  got the following error: 
RuntimeError: Deterministic behavior was enabled with either torch.set_deterministic(True) or at::Context::setDeterministic(true), but this operation is not deterministic because it use…