I checked the size of y and output.
The size of y is torch.Size([6])
The size of output is torch.Size([1, 6]
Also, when I adjusted the size to [1,6], I got the following error.
Traceback (most recent call last):
  File "C:/Users/tazawa/Desktop/myo-python-1.0.4/bindsnet-master/bindsnet/nextrsnn.py", line 107, in <module>
    loss = criterion(output.squeeze(-1),  y.squeeze(-1).long())
  File "C:\Python36\lib\site-packages\torch\nn\modules\module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "C:\Python36\lib\site-packages\torch\nn\modules\loss.py", line 948, in forward
    ignore_index=self.ignore_index, reduction=self.reduction)
  File "C:\Python36\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 "C:\Python36\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: 1D target tensor expected, multi-target not supported