CUDA out of memory. Tried to allocate 20.00 MiB. GPU 0 has a total capacty of 3.69 GiB of which 20.81 MiB is free

We require some more context.

The error specifically indicates that you are putting more memory than your GPU can handle.