Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using CIFAR10, when I tried to train, I met some error at step-4 (4. Determine reliable images). #32

Open
edwardcho opened this issue Sep 30, 2022 · 0 comments

Comments

@edwardcho
Copy link

Hello Sir,

As I mentioned at Title,
I was tried to train your code.

When I tried train according to your help-site(https://github.com/niuchuangnn/SPICE/blob/main/train.md),
I met some error.

4. Determine reliable images

python tools/local_consistency.py --config-file ./configs/cifar10/eval.py --embedding ./results/cifar10/embedding/feas_moco_512_l2.npy

This is error message.

Traceback (most recent call last):
  File "tools/local_consistency.py", line 141, in <module>
    main()
  File "tools/local_consistency.py", line 131, in main
    acc = calculate_acc(labels_select, gt_labels_select)
  File "./spice/utils/evaluation.py", line 21, in calculate_acc
    assert len(np.unique(ypred)) == len(np.unique(y))
AssertionError

So I checked labels_select and gt_labels_select,

len(labels_select) : 10
tensor([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
len(gt_labels_select) : 10
[8 5 8 5 3 4 1 5 1 3]

What I should do for this problem??

Thanks,
Edward Cho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant