hendrycks / outlier-exposure

Deep Anomaly Detection with Outlier Exposure (ICLR 2019)
Apache License 2.0
544 stars 108 forks source link

About the ratio of OOD examples in the test set #9

Closed kcharanj closed 4 years ago

kcharanj commented 4 years ago

Hi, I am testing the robustness of the OExp results against different ratios of in-distribution and OOD examples in the test set (in case of CIFAR10 dataset). I get an error if I consider this ratio below the ratio 1:50. The error is in 'get_ood_scores' subroutine where at the end in the else condition:  return  concat(_score)[:ood_num_examples].copy(). Error message: "ValueError: need at least one array to concatenate" It does not return the score for ood_num_examples. Could you please let me know why this is the case? Thanks and best regards, Charanjit

hendrycks commented 4 years ago

The ratio is probably so small that examples are not fed through. https://github.com/hendrycks/outlier-exposure/blob/master/CIFAR/test.py#L118