Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于多分类问题询问 #13

Closed
Monologuethl opened this issue Sep 26, 2019 · 1 comment
Closed

关于多分类问题询问 #13

Monologuethl opened this issue Sep 26, 2019 · 1 comment

Comments

@Monologuethl
Copy link

已经将
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
能否上传一份测试多分类分割的示例代码呢

@Monologuethl
Copy link
Author

已解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant