This
>  return torch._C._nn.gelu(input)
> RuntimeError: CUDA out of memory. Tried to allocate 2.00 MiB (GPU 0; 5.80 GiB total capacity; 3.83 GiB already allocated; 16.50 MiB free; 4.01 GiB reserved in total by PyTorch)

I put a counter for images so when I changed the number of resizing it keep going on but stop in some images