Binary Classification with Subclasses/Subcategories

Dear PyTorch Forum,
is it possible to have a binary classification with multiply categories? The idea is basically that I have multiple subcategories, which can categorised into two groups. For example I have the subcategories:

  • A, B, 1 and 2
    which than can be:
  • letters or numbers

additionally I am interested which of these four categories causes the most errors. Hope I explained well enough what I want/need. Thank you for your help in advance.