Classification bug

Hello my code and dataset is here :

I have the following error :
Traceback (most recent call last):
File “”, line 209, in
loss = criterion(outputs, labels)
File “C:\Users\Sylvain ARD.conda\envs\detectron2\lib\site-packages\torch\nn\modules\”, line 889, in _call_impl
result = self.forward(*input, **kwargs)
File “C:\Users\Sylvain ARD.conda\envs\detectron2\lib\site-packages\torch\nn\modules\”, line 1048, in forward
ignore_index=self.ignore_index, reduction=self.reduction)
File “C:\Users\Sylvain ARD.conda\envs\detectron2\lib\site-packages\torch\nn\”, line 2690, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File “C:\Users\Sylvain ARD.conda\envs\detectron2\lib\site-packages\torch\nn\”, line 2385, in nll_loss
ret = torch._C._nn.nll_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
IndexError: Target 3 is out of bounds.

please help me !

I have found the bug it was at line :
model.fc = nn.Linear(num_ftrs, 3)
3 is the number of classes, I replaced it by num_classes=14 and it works !