How to build a resnet with Keras that trains and predicts the subclass from the main class?
The easiest way to do so would be to train multiple classifiers and build a hierarchical system by yourself.
One classifier detecting class A, B etc. After that make a new prediction for subclasses.
If you want only one single classifier:
What about just killing the first hierarchy of parent classes? Should be also quite easy. If you really want a model, where the hierarchy is learned take a look at Hierarchical Multi-Label Classification Networks.
I would like go implement  a hierarchical resnet architecture. However, I could not find any solution for this. For example, my data structure is like:

class A


Subclass 1
Subclass 2
....

class B


subclass 6
........


So i would like to train and predict the main class and then the subclass of the chosen/predicted mainclass. Can someone provide a simple example how to do this with generators?