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

Add larger support for pytorch model hub #9

Open
David-Nevezi-Strango opened this issue Aug 9, 2024 · 2 comments
Open

Add larger support for pytorch model hub #9

David-Nevezi-Strango opened this issue Aug 9, 2024 · 2 comments

Comments

@David-Nevezi-Strango
Copy link

I am currently facing some issues, regarding trying to put into PIT a predefined model from pytorch hub. Currently i ve faced multiple issues, such as, for annotation.py, line 255, n.meta has no key "tensor_meta" for example

@matteorisso
Copy link
Collaborator

Hello dear @David-Nevezi-Strango, can you provide a minimum reproducible example so that I can better investigate your problem?

@David-Nevezi-Strango
Copy link
Author

David-Nevezi-Strango commented Aug 9, 2024

Yes, sorry about not leaving more details about it

so the PIT constructor fails if i call it using the following lines (you may try different networks as well, for some it will write unsupported OP such as adaptive avgpool2d, for others it will give KeyError: "tensor_meta"):
model_pt = torch.hub.load('pytorch/vision:v0.10.0', 'resnet18', weights=tv.models.ResNet18_Weights.DEFAULT)
model = PIT(model_pt, input_shape=input_shape, cost=params, discrete_cost=True)
where input_shape is given by the dataset and params is from from plinio.cost import params

Torch version is 2.3.0 with torchvision 0.18.0

EDIT: checked torch version again, it is 2.3.0

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