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

Unable to load pre-trained alexnet weights #1171

Closed
mika-long opened this issue May 21, 2024 · 2 comments
Closed

Unable to load pre-trained alexnet weights #1171

mika-long opened this issue May 21, 2024 · 2 comments

Comments

@mika-long
Copy link

I have installed packages torch, luz, and torchvision.
I had the following code:

library(torch)
library(luz)
library(torchvision)

weights <- model_alexnet(pretrained=TRUE)

The above produces an error as follows:
Error in !self$..refer_to_state_dict.. : invalid argument type

Not sure what is wrong here.

@dfalbel
Copy link
Member

dfalbel commented May 21, 2024

You probably need to reinstall torch vision, using something like install.packages("torchvision, type="source").
Probably related to mlverse/torchvision#100 (comment)

@mika-long
Copy link
Author

This worked! Thank you 🙏

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