loss = torch.nn.CrossEntropyLoss()
loss_values = loss(train_output, train_label)
***** train_label shape: torch.Size([32, 96, 128])
***** train_output shape: torch.Size([32, 5, 96, 128])

image1616×338 54.3 KB

when chang it to Long type, or float type , it will get new error