Jingkang50 / OpenOOD

Benchmarking Generalized Out-of-Distribution Detection
MIT License
858 stars 108 forks source link

Some issues about OOD testing. #204

Closed ZouXinn closed 11 months ago

ZouXinn commented 11 months ago

When I run the command "imagenet_test_ood_gram.sh", the program seems to be killed automatically when computing min/max. This only happens to the GRAM method among the post-hoc methods. And for cifar100/cifar100/imagenet200, the tests for gram succeed. Furthermore, after the program is killed, the GPU memory is not released, which is confusing. In fact, the problem that the GPU memory is not released happens not only to GRAM, it seems that it happens when I run the file "eval_ood_imagenet.py", the only difference is that when I run other methods, the program is not killed and finishes successfully.

Here is the output when I run "sh "imagenet_test_ood_gram.sh":

CUDA_VISIBLE_DEVICES=1 sh scripts/ood/gram/imagenet_test_ood_gram.sh
Compute min/max:  31%|████████████████████████████████████████████████████████████████████████▌                                                                                                                                                                
| 2002/6406 [34:40<5:30:31,  4.50s/it]Killed
zjysteven commented 11 months ago

We haven't really seen such issues (program killed and memory not released) on our side, and I suspect that this might be something specific to your environment. eval_ood_imagenet.py does nothing special other than loading the model, making forward pass with certain OOD detector, getting the OOD score, and calculating the OOD detection performance. These steps are pretty similar to what you would do to evaluate classification accuracy, which shouldn't really cause the issues you mentioned.

ZouXinn commented 11 months ago

Thank you, I will check my environment carefully.

zjysteven commented 11 months ago

Closing now. Feel free to reopen if there are any other issues.