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

model.predict not working with test_loader as in the documentation #89

Closed francescamanni1989 closed 3 years ago

francescamanni1989 commented 3 years ago

Hi! Thanks for your amazing work with torch_ensemble. I am trying to use model_predict for the MNIST example by implementing the following as in the documentation. model.predict(test_loader).

However I keep having this error. ValueError: The type of input X should be one of {{torch.Tensor, np.ndarray}}.

xuyxu commented 3 years ago

Hi @francescamanni1989, if you want to evaluate the ensemble on the test_loader, please use the evaluate method.

xuyxu commented 3 years ago

closed due to inactivity