libspn icon indicating copy to clipboard operation
libspn copied to clipboard

Can't save a convSPN

Open IagoParis opened this issue 4 years ago • 2 comments

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?

IagoParis avatar Nov 12 '19 13:11 IagoParis

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.

jostosh avatar Nov 12 '19 14:11 jostosh

Wow, thank you very much for your quick response. If you need extra info, just ask.

IagoParis avatar Nov 12 '19 14:11 IagoParis