When I ran the code using the kaggle_3m dataset, after 2 epochs, the following error occured.
Traceback (most recent call last):
File "D:\UNet_from_github\3_brain-segmentation-pytorch-master\train.py", line 275, in
main(args)
File "D:\UNet_from_github\3_brain-segmentation-pytorch-master\train.py", line 112, in main
dsc_per_volume(
File "D:\UNet_from_github\3_brain-segmentation-pytorch-master\train.py", line 175, in dsc_per_volume
dsc_list.append(dsc(y_pred, y_true))
File "D:\UNet_from_github\3_brain-segmentation-pytorch-master\utils.py", line 11, in dsc
File "D:\Anaconda3\envs\pytorch\lib\site-packages\medpy\filter\binary.py", line 112, in largest_connected_component
largest_component_idx = numpy.argmax(component_sizes) + 1
File "<__array_function__ internals>", line 180, in argmax
File "D:\Anaconda3\envs\pytorch\lib\site-packages\numpy\core\fromnumeric.py", line 1216, in argmax
return _wrapfunc(a, 'argmax', axis=axis, out=out, kwds)
File "D:\Anaconda3\envs\pytorch\lib\site-packages\numpy\core\fromnumeric.py", line 54, in _wrapfunc
return _wrapit(obj, method, *args, *kwds)
File "D:\Anaconda3\envs\pytorch\lib\site-packages\numpy\core\fromnumeric.py", line 43, in _wrapit
result = getattr(asarray(obj), method)(args, kwds)
ValueError: attempt to get argmax of an empty sequence
I can not find solution around the Internet. Could you help me?
When I ran the code using the kaggle_3m dataset, after 2 epochs, the following error occured.
Traceback (most recent call last): File "D:\UNet_from_github\3_brain-segmentation-pytorch-master\train.py", line 275, in
main(args)
File "D:\UNet_from_github\3_brain-segmentation-pytorch-master\train.py", line 112, in main
dsc_per_volume(
File "D:\UNet_from_github\3_brain-segmentation-pytorch-master\train.py", line 175, in dsc_per_volume
dsc_list.append(dsc(y_pred, y_true))
File "D:\UNet_from_github\3_brain-segmentation-pytorch-master\utils.py", line 11, in dsc
File "D:\Anaconda3\envs\pytorch\lib\site-packages\medpy\filter\binary.py", line 112, in largest_connected_component
largest_component_idx = numpy.argmax(component_sizes) + 1
File "<__array_function__ internals>", line 180, in argmax
File "D:\Anaconda3\envs\pytorch\lib\site-packages\numpy\core\fromnumeric.py", line 1216, in argmax
return _wrapfunc(a, 'argmax', axis=axis, out=out, kwds)
File "D:\Anaconda3\envs\pytorch\lib\site-packages\numpy\core\fromnumeric.py", line 54, in _wrapfunc
return _wrapit(obj, method, *args, *kwds)
File "D:\Anaconda3\envs\pytorch\lib\site-packages\numpy\core\fromnumeric.py", line 43, in _wrapit
result = getattr(asarray(obj), method)(args, kwds)
ValueError: attempt to get argmax of an empty sequence
I can not find solution around the Internet. Could you help me?