lambeq
lambeq copied to clipboard
Error from_tk
Discussed in https://github.com/CQCL/lambeq/discussions/49
Originally posted by JVM1982 October 10, 2022 Hello.
Why the following code does not work ? :
sentence = 'person runs program .' diagram = remove_cups( parser.sentence2diagram( sentence ) ) circuit = ansatz( diagram ) print( model( [ circuit ] ) ) # OK # print( model( [ from_tk( circuit.to_tk() ) ] ) ) # ERROR #
[[0.14473685 0.85526315]] Unexpected exception formatting exception. Falling back to standard exception
Traceback (most recent call last):
File "/home/javier.valera/.local/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3378, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "/tmp/ipykernel_16444/2916265434.py", line 9, in
Thanks.