libspn
libspn copied to clipboard
Can't save a convSPN
Hello developers of LibSPN
I'm trying to save the convSPN created in your tutorial 7 with the code:
spn.JSONSaver('convSPN.spn', pretty=True).save(root)
after training. It is returning the error:
[50, 27, 26, ..., 20, 21, 61]],
[[38, 23, 29, ..., 8, 14, 16],
[23, 20, 10, ..., 33, 10, 50]]]) is not JSON serializable
from the file _encode_json(obj)
Is there something I can do to save it?
Hi there, I have a suspicion it's trying to JSON serialize the one hot kernels in one of the conv products layers. Will have to make a fix for this. I'll try and get to it tomorrow.
Wow, thank you very much for your quick response. If you need extra info, just ask.