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

How is x.pt file generated with the extension python test.py --few_shot_dir #7

Closed
hejinsome opened this issue Apr 1, 2024 · 1 comment

Comments

@hejinsome
Copy link

hejinsome commented Apr 1, 2024

Thank you for doing a great job. I have a question here: First, I use my own few-shot normal sample training to verify defect detection. I need x.pt format file for the parameter --few_shot_dir in Python test.py. I don't know how to convert a normal sample to. pt?

few_shot_path = os.path.join(cfg.few_shot_dir, cfg.category+".pt")
normal_list = torch.load(few_shot_path)

Please give me help. thanks.

@hejinsome hejinsome changed the title How is a. pt file generated with the extension test.py --few_shot_dir How is x.pt file generated with the extension python test.py --few_shot_dir Apr 1, 2024
@Diana1026
Copy link
Collaborator

Hi, you can use torch.save() to generate .pt file for your own few-shot samples.

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