Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when saving RAT-SPN #39

Open
twebr opened this issue May 27, 2021 · 2 comments
Open

Error when saving RAT-SPN #39

twebr opened this issue May 27, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@twebr
Copy link

twebr commented May 27, 2021

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.

@jostosh jostosh added the bug Something isn't working label May 27, 2021
@jostosh
Copy link
Collaborator

jostosh commented May 27, 2021

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.

@twebr
Copy link
Author

twebr commented May 31, 2021

Thank you, that will do as a workaround!

twebr added a commit to twebr/libspn-keras that referenced this issue Jun 10, 2021
See pronobis#39

Note that this hotfix was not tested extensively and could introduce other bugs. Use with caution!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants