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

TypeError: bad operand type for unary -: 'NoneType' when running PNN_HCAS_area_repair.py #13

Open
OldGlycine opened this issue Jan 16, 2024 · 0 comments

Comments

@OldGlycine
Copy link

When I tried to run PNN_HCAS_area_repair.py, an error occured

Traceback (most recent call last):
File "d:\Study\REASSURE-main\ICLR\Experiments\HCAS\PNN_HCAS_area_repair.py", line 61, in
PNN_HCAS_advanced(num, n)
File "d:\Study\REASSURE-main\ICLR\Experiments\HCAS\PNN_HCAS_area_repair.py", line 20, in PNN_HCAS_advanced
[item for item in all_linear_regions if not verify(item[0], item[1], item[2], target_model.layers, right_label=right_label)]
File "d:\Study\REASSURE-main\ICLR\Experiments\HCAS\PNN_HCAS_area_repair.py", line 20, in
[item for item in all_linear_regions if not verify(item[0], item[1], item[2], target_model.layers, right_label=right_label)]
File "d:\Study\REASSURE-main\ICLR\Experiments\HCAS....\tools\linear_region.py", line 157, in verify
res = res and (solve_LP(np.matmul(P[i], C), A, b, None, is_minimum=False) + np.matmul(P[i], d) <= qu[i])
File "d:\Study\REASSURE-main\ICLR\Experiments\HCAS....\tools\gurobi_solver.py", line 48, in solve_LP
return -linprog(-c, A, b, bounds).fun
TypeError: bad operand type for unary -: 'NoneType'

I haven't change any codes and I can't figured out why it happend, could you help me? Thank you very much!

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