So the model's different outputs are not independent of one another. So if Level1 is predicted as Fruits, level 2 can only be Green or Red.
One naive way i think is to concatenate all the labels together and create multiple new labels, like Fruits|Green|WaterMelon and Fruits|Red|Strawberry and Fruits|Red|Apple etc.The Label Powerset way.
However having 5 levels, this might have an explosion in the number of outputs to predict. Is there any elegant way to go about it ?