vertaix/Vendi-Score

Got different Score from the paper with CIFAR10

ia-gu opened this issue · 1 comments

ia-gu commented

Hi, Thank you very much for the package, I want to use this with CIFAR10 dataset. I implement as below

cifar10 = datasets.CIFAR10("samples/cifar10/original", train=False, download=True)
cifar10 = [[x for x, y in cifar10 if y == c] for c in range(10)]
cifar10_list = []
pvs = []
ivs = []
x = []

for i in cifar10:
    cifar10_list.extend(i)
    ivs.append(image_utils.embedding_vendi_score(cifar10_list, device=torch.device('cuda')))
    pvs.append(image_utils.pixel_vendi_score(cifar10_list))
    x.append(len(ivs))
    
plt.plot(x, ivs, label='evs')
plt.plot(x, pvs, label='pvs')
plt.xlabel('number of classes')
plt.ylabel('vendi score')
plt.legend()
plt.show()

then I got VS around 7to9. However, in your paper, you got 19.50 (Inception VS) with CIFAR10. Maybe I made some mistakes, but I couldn't find them. Thus, I'd like to know how you implement the experiment.

Thanks in advance!!

Hello ia-gu, we already provided code for computing the Vendi Score. You can find a concrete description with illustrative examples on how to compute the Vendi Score on your dataset.