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 to use MN3_antispoof.pth.tar #39

Open
blackbeandu opened this issue Sep 13, 2023 · 0 comments
Open

How to use MN3_antispoof.pth.tar #39

blackbeandu opened this issue Sep 13, 2023 · 0 comments

Comments

@blackbeandu
Copy link

Hello,

i want to use state_dict.

My code :
check_point = torch.load("MN3_antispoof.pth.tar", map_location=torch.device('cpu'))
weight = check_point['state_dict']

and i want to use look like
model = VectorCNN()
model_state_dict = torch.load(weight)
model.load_state_dict(model_state_dict)

"I currently have a class VectorCNN that takes in a .xml and looks for a .bin to load the model in IE format. However, I want to use it with PyTorch itself. I want to save the entire model. For example, 'torch.load(model, 'model.pt').' "

Thanks a lot.

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