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

Reciprocal AssertionError #78

Open
jannickstrobel opened this issue Oct 9, 2024 · 0 comments
Open

Reciprocal AssertionError #78

jannickstrobel opened this issue Oct 9, 2024 · 0 comments

Comments

@jannickstrobel
Copy link

Hello together,
I am trying to add nonlinear calculations to the ouput of a network, inlcuding a division.

I am using torch.reciprocal for this, by definition, the denominator is >0.
Nevertheless, alpha-beta-crown reports an assertion error in BoundReciprocal:

  File "/home/*/alpha-beta-CROWN/complete_verifier/auto_LiRPA/operators/activation_base.py", line 285, in bound_backward
    self.bound_relax(x, init=True, dim_opt=start_shape)
  File "/home/*/alpha-beta-CROWN/complete_verifier/auto_LiRPA/operators/convex_concave.py", line 131, in bound_relax
    assert x.lower.min() > 0
           ^^^^^^^^^^^^^^^^^
AssertionError

I added a Relu function to clamp the denominator to >0 but this did not resolve the error.
These are the lines causing my error:

_C3 = 0.00000144
denominator = torch.add(torch.relu(torch.sub(denominator, _C3)), _C3)            
recip_denom = torch.reciprocal(denominator)

Full output: https://pastebin.com/Bb9WiwFU

System configuration:

  • OS: Ubuntu 22.04
  • Have you tried to reproduce the problem in a cleanly created conda/virtualenv environment using official installation instructions and the latest code on the main branch?: Yes

Thank you very much for your help already!

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

No branches or pull requests

1 participant