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

如何解决ValueError: cannot reshape array of size 1288 into shape (28,28) #6

Open
Harry-Bai opened this issue Nov 4, 2024 · 1 comment

Comments

@Harry-Bai
Copy link

Getting transformed features...
Calculating distances...
Maximum distance from cluster centers is 1.31
initial embedding size : (137984, 1536)
final embedding size : (13798, 1536)
0%| | 0/10 [29:48<?, ?it/s]
Traceback (most recent call last):
File "train.py", line 685, in
main()
File "train.py", line 193, in main
gt_list_px_lvl, gt_list_img_lvl, gt_list, gt_mask_list = test_patchcore2(models, inference_round, fixed_fewshot_list,
File "train.py", line 673, in test_patchcore2
anomaly_map = score_patches[:,0].reshape((28,28))
ValueError: cannot reshape array of size 1288 into shape (28,28)

@Haoyan-Guan
Copy link
Owner

The size of your input image maybe wrong?

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

2 participants