You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "C:/Users/Dingd/Documents/GitHub/MAML-Pytorch-master/omniglot_train.py", line 95, in
main(args)
File "C:/Users/Dingd/Documents/GitHub/MAML-Pytorch-master/omniglot_train.py", line 55, in main
accs = maml(x_spt, y_spt, x_qry, y_qry)
File "C:\Users\Dingd\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "C:\Users\Dingd\Documents\GitHub\MAML-Pytorch-master\meta.py", line 85, in forward
loss = F.cross_entropy(logits, y_spt[i])
File "C:\Users\Dingd\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\functional.py", line 1970, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "C:\Users\Dingd\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\functional.py", line 1790, 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'
The text was updated successfully, but these errors were encountered:
Traceback (most recent call last):
File "C:/Users/Dingd/Documents/GitHub/MAML-Pytorch-master/omniglot_train.py", line 95, in
main(args)
File "C:/Users/Dingd/Documents/GitHub/MAML-Pytorch-master/omniglot_train.py", line 55, in main
accs = maml(x_spt, y_spt, x_qry, y_qry)
File "C:\Users\Dingd\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\modules\module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "C:\Users\Dingd\Documents\GitHub\MAML-Pytorch-master\meta.py", line 85, in forward
loss = F.cross_entropy(logits, y_spt[i])
File "C:\Users\Dingd\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\functional.py", line 1970, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "C:\Users\Dingd\AppData\Local\Programs\Python\Python36\lib\site-packages\torch\nn\functional.py", line 1790, 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'
The text was updated successfully, but these errors were encountered: