Description
VALIDATION - loss: 0.0000: 0%| | 0/67 [00:00<?, ?it/s]<class 'int'>
Traceback (most recent call last):
File "C:/Users/01/Desktop/GNN(图神经网络)/算法实践/GCN/cnn_graph.pytorch-master/train.py", line 159, in
trainer.run()
File "C:/Users/01/Desktop/GNN(图神经网络)/算法实践/GCN/cnn_graph.pytorch-master/train.py", line 71, in run
acc, mloss = self.validation(epoch)
File "C:/Users/01/Desktop/GNN(图神经网络)/算法实践/GCN/cnn_graph.pytorch-master/train.py", line 107, in validation
loss = self.criterion(logits, labels.cuda())
File "D:\Anaconda\lib\site-packages\torch\nn\modules\module.py", line 722, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\Anaconda\lib\site-packages\torch\nn\modules\loss.py", line 948, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File "D:\Anaconda\lib\site-packages\torch\nn\functional.py", line 2422, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "D:\Anaconda\lib\site-packages\torch\nn\functional.py", line 2218, in nll_loss
ret = torch._C._nn.nll_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: Expected object of scalar type Long but got scalar type Int for argument #2 'target' in call to _thnn_nll_loss_forward