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

关于semi半监督模式下的测试精度计算问题 #13

Open
nmvbxcz opened this issue Sep 7, 2020 · 1 comment
Open

关于semi半监督模式下的测试精度计算问题 #13

nmvbxcz opened this issue Sep 7, 2020 · 1 comment

Comments

@nmvbxcz
Copy link

nmvbxcz commented Sep 7, 2020

你好,想请教一下
` elif supervision == 'semi':

            outs = net(data)

            output, rec = outs

            #target = target - 1

            loss = criterion[0](output, target) + net.aux_loss_weight * criterion[1](rec, data)`

这里返回的rec对应的是模型中分类前一步结果送入nn.Linear(self.features_sizes, input_channels)中得到,这里对于模型
criterion = (nn.CrossEntropyLoss(weight=kwargs['weights']), lambda rec, data: F.mse_loss(rec, data[:,:,:,patch_size//2,patch_size//2].squeeze()))这段有什么作用?

@rongtongxueya
Copy link

我也想知道

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

2 participants