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

KeyError : am__n.r@s@s.l@n_3 #19

Closed
ACE07-Sev opened this issue Jun 17, 2022 · 1 comment
Closed

KeyError : am__n.r@s@s.l@n_3 #19

ACE07-Sev opened this issue Jun 17, 2022 · 1 comment

Comments

@ACE07-Sev
Copy link
Contributor

Traceback (most recent call last):
File "C:\Users\elmm\AppData\Local\Programs\Python\Python39\lib\site-packages\lambeq\training\numpy_model.py", line 154, in get_diagram_output
values.append(parameters[sym])
KeyError: am__n.r@s@s.l@n_3

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\elmm\Desktop\CQM\QNLP Depression 2.py", line 125, in
prediction = model.forward([diagram])
File "C:\Users\elmm\AppData\Local\Programs\Python\Python39\lib\site-packages\lambeq\training\numpy_model.py", line 185, in forward
return self.get_diagram_output(x)
File "C:\Users\elmm\AppData\Local\Programs\Python\Python39\lib\site-packages\lambeq\training\numpy_model.py", line 156, in get_diagram_output
raise KeyError(f'Unknown symbol {sym!r}.')
KeyError: 'Unknown symbol am__n.r@s@s.l@n_3.'

I ran "I am depressed" and got this error. Any resolves?

@y-richie-y
Copy link
Collaborator

Thanks for the issue! As we discussed on discord, you tried evaluating IQP circuits with 2 layers on a model that has been trained on 1 layer, hence the missing parameters.

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