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.09k stars 95 forks source link

[ENH] Refactor the operations on tensors into a standalone module `torchensemble.operation` #28

Closed xuyxu closed 3 years ago

xuyxu commented 3 years ago

Currently, many codes implemented in different ensembles are redundant. For example, the outputs of voting, bagging, snapshot ensemble all take the average over predictions from base estimators, leading to high redundancy on their forward functions.

It would be much better to have them aggregated into a standalone module torchensemble.operation, which focuses on the operations on tensors. Besides, additional unit tests on this module would help to improve the robustness of the entire package.

Below is the list on operations needed to be refactored and included in torchensemble.operation:

It would be great to have this done before the 0.1.0 release @zzzzwj.

xuyxu commented 3 years ago

@all-contributors please add @cspsampedro for ideas

allcontributors[bot] commented 3 years ago

@xuyxu

I've put up a pull request to add @cspsampedro! :tada: