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

Quantized version of Sigmoid doesn't have _get_name method #85968

Closed
L-ED opened this issue Sep 30, 2022 · 5 comments
Closed

Quantized version of Sigmoid doesn't have _get_name method #85968

L-ED opened this issue Sep 30, 2022 · 5 comments
Assignees
Labels
oncall: quantization Quantization support in PyTorch triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@L-ED
Copy link

L-ED commented Sep 30, 2022

🐛 Describe the bug

Hello, i'm interested in fx quantization of pytorch model. In my project i need to register model by its class name, for example:
I define module class from GraphModule by calling node.target. For quantized version of ConvBnReLU output would be QuantizedConvBnReLU.

Despite quantized Sigmoid my method works for any quantized module because of “Quantized” prefix in module class name.

I checked realization of quantized activations and Sigmoid doesn’t contain method _get_name like any other realization of quantized activation.

Versions

wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py

For security purposes, please check the contents of collect_env.py before running it.

python collect_env.py

cc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel

@albanD albanD added the oncall: quantization Quantization support in PyTorch label Oct 3, 2022
@jerryzh168
Copy link
Contributor

thanks for reporting the issue. could you check if we are using torch.nn.quantized.Sigmoid or torch.nn.Sigmoid here? my guess is that we are using torch.nn.Sigmoid right now

@L-ED
Copy link
Author

L-ED commented Oct 5, 2022

Screenshot from 2022-10-05 19-21-13

@jerryzh168
Copy link
Contributor

sorry, in the quantized model, which one did you see?

@andrewor14
Copy link
Contributor

Hi @L-ED, is this still an issue? Did you find a workaround?

@andrewor14 andrewor14 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Aug 10, 2023
@andrewor14
Copy link
Contributor

Hi @L-ED, I'm closing this for now since relying on module name having "Quantized" isn't a robust way to check whether the module is actually quantized. If you don't see quantized sigmoid in the model then that's a different issue, in which case feel free to open a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oncall: quantization Quantization support in PyTorch triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

4 participants