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

unknown mistake #1

Closed
x12901 opened this issue Aug 3, 2021 · 1 comment
Closed

unknown mistake #1

x12901 opened this issue Aug 3, 2021 · 1 comment

Comments

@x12901
Copy link

x12901 commented Aug 3, 2021

Hi. I am glad to see your answer.
xiahaifeng1995/PaDiM-Anomaly-Detection-Localization-master#8
I tried to run the program but got an error. This code does not seem to be in other projects.
https://github.com/xiahaifeng1995/PaDiM-Anomaly-Detection-Localization-master
I suspect it is a memory problem. But I changed batch_size and it didn't work.

Loaded pretrained weights for efficientnet-b0
training:  None
train set feature file not exists: D:/PaDiM-EfficientNet-master/mvtec_result\model_pkl_efficientnet-b0\train_bottle.pkl
| feature extraction | test | bottle |: 100%|██████████| 1/1 [00:04<00:00,  4.65s/it]
Traceback (most recent call last):
  File "D:/PaDiM-EfficientNet-master/main.py", line 413, in <module>
    main()
  File "D:/PaDiM-EfficientNet-master/main.py", line 330, in main
    mean = torch.Tensor(train_outputs[0]).to(device)
KeyError: 0
@ingbeeedd
Copy link
Collaborator

ingbeeedd commented Aug 3, 2021

Hello. It's because you don't have a pkl file because didn't train. It says training= None in output. So please add --training parameters. Please refer to usage in README because just committed. Thank you !

@x12901 x12901 closed this as completed Aug 10, 2021
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