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

ImportError: cannot import name 'SetLayer0' from 'torchquantum.layer' #196

Closed
manu123416 opened this issue Sep 24, 2023 · 3 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@manu123416
Copy link

I am getting an import error as below:
ImportError: cannot import name 'SetLayer0' from 'torchquantum.layer'
https://github.com/mit-han-lab/torchquantum/blob/main/examples/param_shift_onchip_training/param_shift.py
Please help me in resolving the error.

@01110011011101010110010001101111
Copy link
Collaborator

Hi! It seems like a typo, trying to import "SetLayer0" instead of "SethLayer0". However, I can't quite replicate at the moment. Is it resolved or are you still running into that issue? If you are still running into the issue, does changing SetLayer0 to SethLayer0 resolve it?

@01110011011101010110010001101111 01110011011101010110010001101111 added the bug Something isn't working label Oct 15, 2023
@01110011011101010110010001101111
Copy link
Collaborator

Hey! I looked into this bug a bit more. For now, if you change the import to from torchquantum.layer.layers import SethLayer0, it should temporarily fix the issue. I’ve also added a more permanent fix in #206; once the PR is merged, the code should run as is!

Thanks for opening this issue, and feel free to reach out if you have any additional questions!

@01110011011101010110010001101111
Copy link
Collaborator

I’m marking this as resolved as it should be fixed in the most recent release! Feel free to reach out with any other questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants