Hi, I am using 7 classes and it says that Target 6 is out of bounds. Batch size I am using is 70 and the labels I printed are these:
torch.Size([70])
tensor([4, 5, 0, 5, 5, 0, 0, 0, 1, 4, 0, 1, 5, 4, 4, 0, 4, 2, 6, 0, 1, 4, 0, 2,
        4, 6, 4, 3, 6, 2, 4, 0, 3, 4, 0, 0, 4, 0, 5, 5, 5, 3, 2, 3, 6, 4, 0, 4,
        5, 5, 2, 4, 5, 3, 6, 1, 2, 0, 1, 6, 3, 4, 1, 4, 4, 2, 6, 6, 2, 2])
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-73-4e4c221a4846> in <module>()
      8     loss_fn = loss_fn,
      9     train_loader = train_loader,
---> 10     validation_loader=validation_loader
     11 )
     12 

2 frames
/usr/local/lib/python3.6/dist-packages/torch/nn/functional.py in nll_loss(input, target, weight, size_average, ignore_index, reduce, reduction)
   1836                          .format(input.size(0), target.size(0)))
   1837     if dim == 2:
-> 1838         ret = torch._C._nn.nll_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
   1839     elif dim == 4:
   1840         ret = torch._C._nn.nll_loss2d(input, target, weight, _Reduction.get_enum(reduction), ignore_index)

IndexError: Target 6 is out of bounds.

The first line is the size of the labels or Targets, second line is the targets themselves.
Please help me. I am in dire need of help.