I am trying to run my model on gpu, but I am getting
RuntimeError: CUDA error: device-side assert triggered
My model runs fine on CPU.
I have set os.environ['CUDA_LAUNCH_BLOCKING'] = "1" and it is showing error when I am loading the model on cuda on the following line -
if train_on_gpu:
    unet = unet.to('cuda')