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?
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.
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?