今天在跑torchensemble的example的石斛出现了下面的问题:
p-2021_11_13_21_52.log...
Traceback (most recent call last):
File "voting_demo.py", line 48, in <module>
model.set_criterion(criterion)
File "/home/eric/anaconda3/envs/seg/lib/python3.6/site-packages/torch/nn/modules/module.py", line 594, in __getattr__
type(self).__name__, name))
AttributeError: 'VotingClassifier' object has no attribute 'set_criterion'
解决方法
pip uninstall torchensemble
git clone https://github.com.cnpmjs.org/TorchEnsemble-Community/Ensemble-Pytorch.git
cd Ensemble-Pytorch
python setup.py install
|