RuntimeError: CUDA error: out of memory

I am getting the error when running the Deep Image Prior’s Super-Resolution. I have attached the screenshots below. Can someone tell me where I am going wrong? Also, some people asked me to reduce the batch size and I dont know how to do it.
p.s. I am using CUDA 9.2 and GPU 12GB which is sufficient to run this.