Additionally to @Latope2-150’s suggestions, also check for functional calls to e.g. dropout (F.dropout), which are missing the training flag. We’ve narrowed down the non-deterministic behavior of similar issues in the past to not disabling dropout properly in eval mode.