TangXu-Group / Remote-Sensing-Images-Classification

the official TangXu's group released codes about the Remote Sensing images classificaiton

Repository from Github https://github.comTangXu-Group/Remote-Sensing-Images-ClassificationRepository from Github https://github.comTangXu-Group/Remote-Sensing-Images-Classification

训练问题

lixingyi19 opened this issue · comments

您好,我在训练的时候并没有修改您的代码,遇到了Function 'XlogyBackward0' returned nan values in its 1th output.的错误,请问是怎么回事

请问您的问题解决了吗,我遇到了同样的问题

您好,我在训练的时候并没有修改您的代码,遇到了Function 'XlogyBackward0' returned nan values in its 1th output.的错误,请问是怎么回事

你好,我还没开始训练,数据读取就有问题(#5 (comment)).
可以分享一下数据目录结构么?

请问您的问题解决了吗,我遇到了同样的问题

你好,我还没开始训练,数据读取就有问题(#5 (comment)).
可以分享一下数据目录结构么?

您好,我在训练的时候并没有修改您的代码,遇到了Function 'XlogyBackward0' returned nan values in its 1th output.的错误,请问是怎么回事

Function 'XlogyBackward0' returned nan values in its 1th output.是因为梯度爆炸了,与这行代码有关
MI_losses = [F.kl_div(raw_logits, F.softmax(logits, -1), size_average=True) for logits in logits_dict]
我将其修改为MI_losses = [F.kl_div(raw_logits, torch.clamp(F.softmax(logits, -1), 1e-8), size_average=True) for logits in logits_dict]解决了问题,希望对你有用。