szc19990412 / TransMIL

TransMIL: Transformer based Correlated Multiple Instance Learning for Whole Slide Image Classification
321 stars 71 forks source link

torchmetrics #39

Open fighting-boy1 opened 7 months ago

fighting-boy1 commented 7 months ago

Hi. Thanks for your great work! May I ask you a question? run: python train.py --stage='train' --config='Camelyon/TransMIL.yaml' --gpus=0 --fold=0 result: self.AUROC = torchmetrics.AUROC(num_classes=2, average = 'macro') TypeError: new() missing 1 required positional argument: 'task'

currently torchmetrics version: 0.11.4
attempt pip install torchmetrics=0.4.1 No result,ERROR: Could not find a version that satisfies the requirement torchmetrics==0.4.1 (from versions: none) ERROR: No matching distribution found for torchmetrics==0.4.1

So how can I solve the above problem, thank you very much for your outstanding contribution!

weiaicunzai commented 6 months ago

I think you could just add argument: task = 'multiclass'.