Skip to content
New issue

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

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

Already on GitHub? # to your account

local variable 'kl' referenced before assignment when using flipout in dnn_to_bnn() #24

Closed
barghit opened this issue Jun 30, 2023 · 3 comments

Comments

@barghit
Copy link

barghit commented Jun 30, 2023

The problem seems to be in line 544 of conv_flipout.py, the line is self.kl = kl inside the forward() method, i get the error "local variable 'kl' referenced before assignment" as an UnboundLocalError.

Thank you in advance.

@ranganathkrishnan
Copy link
Contributor

@barghit can you give more info on how you are defining the model with code snippet or log to understand your issue?

@barghit
Copy link
Author

barghit commented Jul 17, 2023

Hi! I attached the exact code snippet and the error I get. I don't get the same error with the "Reparameterization" option, it works perfectly. (I also thought it was a problem of the summary method but it does the same when i try to run the training).

for_github.txt

ranganathkrishnan added a commit that referenced this issue Jan 2, 2024
Signed-off-by: Ranganath Krishnan <ranganath.krishnan@intel.com>
@ranganathkrishnan
Copy link
Contributor

fixed with commit 1180b87

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants