I did what you said and I got this

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-38-50cfb61e001e> in <module>
      2 lg_shape = logits.shape
      3 labels = inputs['labels']
----> 4 lb_cpu = labels.cpu()

RuntimeError: CUDA error: device-side assert triggered
and this for the logits.shape
torch.Size([3, 2])