TorchEnsemble-Community / Ensemble-Pytorch

A unified ensemble framework for PyTorch to improve the performance and robustness of your deep learning model.
https://ensemble-pytorch.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.08k stars 95 forks source link

How to ensemble several different classification models into a voter? #117

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hi,

I just start learning neural network and I want to create a voter for several different classification models trained on some dataset. It seems that this package is what I need. And I find the sample code in the document https://ensemble-pytorch.readthedocs.io/en/latest/index.html.

model = VotingClassifier( estimator=MLP, n_estimators=10, cuda=True, ) My naive understanding is that here we have 10 same estimators. Can we transfer a list of models instead of just MLP into the arguments?

Thanks

xuyxu commented 2 years ago

Hi @jisutich, please refer to #49 for details on why heteregenous ensemble is hard to implement, thanks.

ghost commented 2 years ago

OK I got it. Thanks.