and the code:
    model.eval()
    eval_loss, eval_accuracy = 0, 0
    nb_eval_steps, nb_eval_examples = 0, 0
    predictions , true_labels = [], []
    it = 0
    for batch in valid_dataloader:
        batch = tuple(t.to(device) for t in batch)
        b_input_ids, b_input_mask, b_labels, b_tags, b_adu = batch
        #print("[evaluation] b_input_ids: ", b_input_ids.shape)
        #print("[evaluation] b_input_mask: ", b_input_mask.shape)
        #print("[evaluation] b_labels: ", b_labels.shape)
        #print("[evaluation] b_tags: ", b_tags.shape)
        #print("[evaluation] b_adu: ", b_adu.shape)

        with torch.no_grad():
            tmp_eval_loss = model(b_input_ids, token_type_ids=None,
                                  attention_mask=b_input_mask, labels=[b_adu, b_tags, b_labels])[0]
            #print("[evaluation] tmp_eval_loss: ", tmp_eval_loss.shape)
            logits = model(b_input_ids, token_type_ids=None,
                           attention_mask=b_input_mask)[0]
            #print("logits: ", logits.shape)
            #print("logits: ", logits.detach().cpu().numpy())
        #logits = logits.detach().cpu().numpy()
        #logits = logits.cpu().numpy()
        it = it + 1
        #print("it:", it)
        #print("[evaluation] logits: ", logits)
        logits = logits.cpu().data.numpy()
        #print("logits: ", logits)

        label_ids = b_labels.to('cpu').numpy()
        predictions.extend([list(p) for p in np.argmax(logits, axis=2)])
        true_labels.append(label_ids)

        tmp_eval_accuracy = flat_accuracy(logits, label_ids)

        eval_loss += tmp_eval_loss.mean().item()
        eval_accuracy += tmp_eval_accuracy

        nb_eval_examples += b_input_ids.size(0)
        nb_eval_steps += 1
    eval_loss = eval_loss/nb_eval_steps
    print("Validation loss: {}".format(eval_loss))
    print("Validation Accuracy: {}".format(eval_accuracy/nb_eval_steps))
    pred_bios = [bio_vals[p_i] for p in predictions for p_i in p]
    valid_bios = [bio_vals[l_ii] for l in true_labels for l_i in l for l_ii in l_i]
    print("F1-Score: {}".format(f1_score(pred_bios, valid_bios)))
    print(confusion_matrix(valid_bios, pred_bios))
    print(classification_report(valid_bios, pred_bios, digits=4, target_names=bio_vals))