I am trying to train a image segmentation model with VGGNet19 backbone for the foreground and background data of nucleus. On trying to fit the model, I get the below error:
RuntimeError: cuda runtime error (59) : device-side assert triggered at /opt/conda/conda-bld/pytorch_1565272271120/work/aten/src/THC/THCCachingHostAllocator.cpp:296
The second part of the error post "at" is obtained due to addition of:
os.environ['CUDA_LAUNCH_BLOCKING'] = "1"
Before importing of torch.
But i fail to understand the error. I am running the code on a sample of 5 pairs of mask and images, and have defined the classes as:
classes_path = DATA_PATH / "class.txt"
classes = read_classes(classes_path)
The classes are defined as "0", "255" as there is only black and white in the masks of the images.