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

Warning: Encountered Known unsupported method torch.tensor & torch.Tensor.expand & torch.Tensor.get_device #358

Open
2dongheee opened this issue Jul 3, 2020 · 5 comments

Comments

@2dongheee
Copy link

Warning: Encountered Known unsupported method torch.tensor & torch.Tensor.expand & torch.Tensor.get_device

I have confirmed that there is no problem with the versions of Torch, Cuda, and Tensorrt.

but, after checking it, the weight is not converted properly and the object detection ability is reduced.

I think that warning is suspected when convert to weight, can you tell me how to solve it?

err
err2

@czs1886
Copy link

czs1886 commented Jul 13, 2020

I think you should write a plugin for Torch.tensor because there might be some new tensors initialized in your model.py. I met the same problem when I was writing the plugin for torch.new_empty. You can try to write a plugin with the tensorrt interfaces provided here.

@czs1886
Copy link

czs1886 commented Jul 13, 2020

I think you should write a plugin for Torch.tensor because there mightbe some new tensors initialized in your model.py. I met the same problem when I was writing the plugin for torch.new_empty. You can try to write a plugin with the tensorrt interfaces provided here.

@gioipv
Copy link

gioipv commented Aug 4, 2021

Hello @czs1886 iam a nwe bies. I also met the same problem. but i dont understand you idea. could u explain for me more clearly

@gioipv
Copy link

gioipv commented Aug 4, 2021

for me. I just met the problem: Warning: Encountered known unsupported method torch.Tensor.expand_as .
So i replace expand_as(..) in my model to expand(...). And it worked.
Refer to https://pytorch.org/docs/stable/generated/torch.Tensor.expand_as.html

@464hee
Copy link

464hee commented Jul 19, 2023

for me. I just met the problem: Warning: Encountered known unsupported method torch.Tensor.expand_as . So i replace expand_as(..) in my model to expand(...). And it worked. Refer to https://pytorch.org/docs/stable/generated/torch.Tensor.expand_as.html

This is a very good approach, thanks for the answer

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

4 participants