libspn-keras
libspn-keras copied to clipboard
Error when saving RAT-SPN
I run into an issue when trying to save the RAT-SPN from the examples (https://git.io/JGLRe). It seems distinct from the earlier issue (#9) on this topic.
When saving, I get the AttributeError: 'PermuteAndPadScopesRandom' object has no attribute 'num_vars_spn_input'
.
I think the issue can be solved by removing the reference to attribute num_vars_spn_input
on line 117 of permute_and_pad_scopes_random.py
. But I am not sure if it can be removed safely.
Thanks for reporting this! I will look into it and see if I can implement some testing around this too. For the time being, I'd suggest you simply store the weights of the SPN using save_weights
and load them again using load_weights
. You will need to have some piece of code that constructs the same SPN in terms of layers for both the save-script as well as the load-script. Hope that makes sense.
Thank you, that will do as a workaround!