awesome-semantic-segmentation-pytorch
awesome-semantic-segmentation-pytorch copied to clipboard
111
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:103: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T *, T *, T *, long *, T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [0,0,0], thread: [987,0,0] Assertion t >= 0 && t < n_classes
failed.
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:103: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T *, T *, T *, long *, T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [0,0,0], thread: [988,0,0] Assertion t >= 0 && t < n_classes
failed.
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:103: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T *, T *, T *, long *, T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [0,0,0], thread: [989,0,0] Assertion t >= 0 && t < n_classes
failed.
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:103: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T *, T *, T *, long *, T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [0,0,0], thread: [990,0,0] Assertion t >= 0 && t < n_classes
failed.
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:103: void cunn_SpatialClassNLLCriterion_updateOutput_kernel(T *, T *, T *, long *, T *, int, int, int, int, int, long) [with T = float, AccumT = float]: block: [0,0,0], thread: [991,0,0] Assertion t >= 0 && t < n_classes
failed.
Traceback (most recent call last):
File "train.py", line 331, in
This error tells that some of the class values in the pixels of your masks are greater than n_classes. Try this:
img= cv2.imread(path_to_mask)
print(numpy.unique(img, return_counts= True))
This will show the unique pixel values and their counts. Check if you have any pixel values more than n_classes.