Difference in training speed between basic PyTorch and PyTorch Lightning solutions #15091
philippejuhel
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I write 2 toy regression programs to compare speed of training.
The first one uses only PyTorch basic functions to program a 2 inputs - 1 output NN (program regressionSimpleXY_Z.txt to be rename in .py)
regressionSimpleXY_Z.txt
The second one uses PyTorch Lightning with the same NN (program predictionWithLightning.txt)
predictionWithLightning.txt
When I run the first program, it takes 0.17s to perform the fit function but when I run the second program, it takes more than 30s with a NVIDIA 2080 GPU card. And for the second program, the number of epochs is 10 times (100 epochs) lower than for the first program (1000 epochs).
How can we explain this?
Regards,
Philippe
Beta Was this translation helpful? Give feedback.
All reactions