已经将
ROOT= './dataset/CamVid'
BINARY_CLASS = 5
改为测试需要的值,并且写好读该数据的函数,测试用的loss为loss.py的MulticlassDiceLoss,因维度问题出现多出报错
N, H, W = target.size(0), target.size(2), target.size(3) IndexError: Dimension out of range (expected to be in range of [-3, 2], but got 3)
修正这个问题后又出现
diceLoss = dice(input[:, i, :, :], target[:, i,:, :]) IndexError: index 1 is out of bounds for dimension 1 with size 1
采用nn.CrossEntropyLoss()为loss,出现
if size_average and reduce: RuntimeError: bool value of Tensor with more than one value is ambiguous
能否上传一份测试多分类分割的示例代码呢
已经将 ROOT= './dataset/CamVid' BINARY_CLASS = 5 改为测试需要的值,并且写好读该数据的函数,测试用的loss为loss.py的MulticlassDiceLoss,因维度问题出现多出报错
N, H, W = target.size(0), target.size(2), target.size(3) IndexError: Dimension out of range (expected to be in range of [-3, 2], but got 3)
修正这个问题后又出现diceLoss = dice(input[:, i, :, :], target[:, i,:, :]) IndexError: index 1 is out of bounds for dimension 1 with size 1
采用nn.CrossEntropyLoss()为loss,出现
if size_average and reduce: RuntimeError: bool value of Tensor with more than one value is ambiguous
能否上传一份测试多分类分割的示例代码呢