例如,如果我想解决 MNIST 分类问题,我们有 10 个输出类。对于 PyTorch,我想使用该torch.nn.CrossEntropyLoss功能。我是否必须格式化目标以便它们是单热编码的,还是我可以简单地使用数据集附带的类标签?
torch.nn.CrossEntropyLoss
python computer-vision multilabel-classification deep-learning pytorch
computer-vision ×1
deep-learning ×1
multilabel-classification ×1
python ×1
pytorch ×1