But when I use the following
I = I.cuda(0)

I am getting an error “Cannot re-initialize CUDA in forked subprocess. To use CUDA with multiprocessing, you must use the ‘spawn’ start method”. Could you suggest me the cuda code for the image and layer?