Thank you!
I found the bugy code:
I use label embeddings, but it does not work during evaluation (else), and the error occurs.
Works though during training (if), where the labels variable has value.
        if labels is not None:
          lab2_emb = self.label2_embedding(labels2)
        else:
          pred_tag = torch.argmax(logits2_normed, dim=2)
          lab2_emb = self.label1_embedding(pred_tag)

I cannot understand the difference though and why it does not work…
For now I have removed this part of code.