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

how to solve the problem that "AssertionError: all the elements in the tensor are zero.: True" #2

Open
jiajunsun68 opened this issue Jul 23, 2024 · 1 comment
Assignees

Comments

@jiajunsun68
Copy link

thanks for ur project.
when i run GBLM-Pruner/gradient_computation.py, I meet a error whose details are below.

Traceback (most recent call last):
File "GBLM-Pruner/gradient_computation.py", line 206, in
grad_up.update_gradient(model, nsample)
File "GBLM-Pruner/gradient_computation.py", line 157, in update_gradient
assert int(all_zero) == 0, f"all the elements in the tensor are zero.: {all_zero}"
AssertionError: all the elements in the tensor are zero.: True

seems that some tensors are zero. I have no idea about this error. would u please tell me how to solve this?

@jiajunsun68
Copy link
Author

I don't know why all the elements in subset[name] should be zero or should not be zero.

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

2 participants