KaiyangZhou / CoOp

Prompt Learning for Vision-Language Models (IJCV'22, CVPR'22)
MIT License
1.77k stars 200 forks source link

Zero division problem of Imagenet dataset #33

Open JoyeMing opened 2 years ago

JoyeMing commented 2 years ago

When I finished testing the other ten data sets, I tried the Imagenet data set. After the training was completed, an error occurred during the test:

File "/home/dpsh/Dassl.pytorch/dassl/evaluation/evaluator.py", line 69, in evaluate

acc = 100.0 * self. correct / self. total

ZeroDivisionError: float division by zero

Is there any similar situation? How was it resolved?

KaiyangZhou commented 2 years ago

it means self._ total=0 which is weird

you need to dive into the dataset and do a debugging to see if there is something wrong