Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

No module named 'torcheval'

I am trying this on Kaggle:

from torcheval.metrics.functional import binary_f1_score
metric = binary_f1_score

And i get an Error:

ModuleNotFoundError                       Traceback (most recent call last)
/tmp/ipykernel_28/3857382439.py in <module>
----> 1 from torcheval.metrics.functional import binary_f1_score
      2 metric = binary_f1_score
      3 model_no_CV = unet_1D().to(device)
      4 optimizer =  torch.optim.Adam(unet_1D.parameters(), lr=0.001)
      5 epochs_num = 30

ModuleNotFoundError: No module named 'torcheval'

I tried to install the latest version of torch, didn’t help
Other torch modules seem to work correctly

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You have to install torcheval library in Kaggle. First of all make sure your internet option is enable to use the kernel then you can try this command:

!pip install torcheval
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading