I would not recommend to downgrade PyTorch to 0.3.1, as this version is too old by now.
Based on your description, I assume you already have an executable code in PyTorch 1.5.0 or the nightly binaries?
If so, do you see any warnings raised during execution?
How large is the difference and what are you comparing at the moment (final accuracy etc.)?