Hello Everyone,
I am new to pyotorch and learning quickly.
I have a dataset of images with 5 category/classes with 2 label.
For prediction of those 2 labels I plan to do an custom ensemble approach.
I want to train separate but same network(densenet-121) for each category/classes. And then the resulting model would predict out of these 2 label. I could not find a similar example for pytorch, If anyone has anyidea or could give me an concrete example would be very helpful.
For example: let’s say I have X,Y,Z,P,Q classes who have label 0, 1
Now I want train total 5 networks. densenet-121_X with the data of X, densenet-121_Y, with the data of Y and so on.
And finally somehow combine those trained model to output a single prediction of 0 or 1 given any test data from X,Y,Z,P,Q classes.  I cant not figure out how to do it and not sure if it is feasible too.
I saw this example Combining Trained Models in PyTorch 473 which is somewhat similar to my idea. But in the end instead of passing two input, I would like to pass one input to get single prediction either 0 or 1 .
Similar to bagging apporach:

bagging.png719×389 76.1 KB

instead of test sample there would images from each category
Thanks a lot in advance for help.