No, please don’t send unnecessary code and lets first start with the shape information.
Add the print statements before calculating the accuracy.
        ...
        # optimize critic
        optimizer_critic.step()

        print(pred_src.shape, pred_src.max(), pred_src.min())
        print(pred_tgt.shape, pred_tgt.max(), pred_tgt.min())
        pred_cls_src = torch.squeeze(pred_src.max(1)[1])
        pred_cls_tgt = torch.squeeze(pred_tgt.max(1)[1])
        acc = ((pred_cls_src == label_src).float().mean() + (pred_cls_tgt == label_tgt).float().mean()) / 2