CUDA out of memory error possible cause
Error:
Open NVIDIA X Server Settings
Check Used Dedicated Memory:
If the Used Dedicated Memory is bigger than 50% or 60%, you should release the GPU occupation.
If using Jupyter Lab, remember restart kernel every time finished running a code file. The button icon circle with arrow.